Old 11-04-2007   #1 (permalink)
Just unleashed!
 
unleash's Avatar
 
Join Date: Jul 2005
Location: Inbetween
Posts: 2,198
Blog Entries: 9

swapping images dynamicly

I'm trying to create an roll-over effect purely with action script. The idea is as following: There is an empty movieclip called mc1, then I dynamicly load an picture from my library into that. And when I roll-over an other picture will load into the mc.

How do I do this? it's not working with an simple, "mc1.loadMovie(pic1);"
So can this be done, and if so how?
__________________
"I haven't failed, I've just found out
10.000 ways that don't work."

~Thomas Edison~
unleash is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-04-2007   #2 (permalink)
Just unleashed!
 
unleash's Avatar
 
Join Date: Jul 2005
Location: Inbetween
Posts: 2,198
Blog Entries: 9

solved! code explained

alright, I got this one solved. I was using the wrong bit of code. For the people who want to know:

on (release) {
main.attachmovie("att1", "newname1", 1);
}

is the right bit of code, where "main" is the movieclip it should load to, "att1" is the file it should load.
__________________
"I haven't failed, I've just found out
10.000 ways that don't work."

~Thomas Edison~
unleash is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-06-2007   #3 (permalink)
Sometimes...Mastermind
 
pgsmedia's Avatar
 
Join Date: Jan 2007
Location: Atlanta
Posts: 118

that's a promising little snippet there, unleash:

Wouldn't it be somehow possible to set up a real simple scene with 2 media playback components, fed by 2 external mp3s like you did with the images?

That would give them independent play\volume controls, right?
Are you thinkin what I'm thinkin?

...REEEEEEMIX!

__________________
pgsmedia is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-06-2007   #4 (permalink)
Just unleashed!
 
unleash's Avatar
 
Join Date: Jul 2005
Location: Inbetween
Posts: 2,198
Blog Entries: 9

Reeemix indeed

I didn't even think about it that way, I just tryed to get a slideshow/ gallery thingy to work. But that is indeed a great idea....
__________________
"I haven't failed, I've just found out
10.000 ways that don't work."

~Thomas Edison~
unleash is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-07-2007   #5 (permalink)
Just unleashed!
 
unleash's Avatar
 
Join Date: Jul 2005
Location: Inbetween
Posts: 2,198
Blog Entries: 9

Ooh Ooh, just an update,

I tried an "mutated" version of that part of code yesterday, for fun really. I made like a mini scratch table with 4 songs It was fun to make but I forgot to save the files

did you have any luck?
__________________
"I haven't failed, I've just found out
10.000 ways that don't work."

~Thomas Edison~
unleash is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-07-2007   #6 (permalink)
Sometimes...Mastermind
 
pgsmedia's Avatar
 
Join Date: Jan 2007
Location: Atlanta
Posts: 118

Freakin awesome, unleash!

I haven't had a chance to start on it, but I bet I can piece it together.

I've been thinkin, though.
It could also use drop-down menus to feed the song instances, yeah?
Maybe they could go to a whole music folder.

And since AScript 3.0, you can put custom sound effects on a sound instance. Like gate filters and fades and all that. Do you think those can be controlled by AScript, too?
Man! I gotta finish some of these WIPs so I can do this.
__________________
pgsmedia is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-08-2007   #7 (permalink)
Just unleashed!
 
unleash's Avatar
 
Join Date: Jul 2005
Location: Inbetween
Posts: 2,198
Blog Entries: 9

hmm, good questioning
As far as I know everything in AS3.0/ CS3 is an object but also a variable. So if the classes are configured the right way everything should be possible:P

so I think that everything can be controlled by AS3.0 but you should put in a listener then. Then it would also be cool if you could make a "game"where people could like mix there own sounds and then save them onto their hard disk, don't you agree?

anyways I will have a look at it this afternoon maybe I can figure some things out.
__________________
"I haven't failed, I've just found out
10.000 ways that don't work."

~Thomas Edison~
unleash is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-08-2007   #8 (permalink)
Just unleashed!
 
unleash's Avatar
 
Join Date: Jul 2005
Location: Inbetween
Posts: 2,198
Blog Entries: 9

alright a new question occurd,

how can I center dynamicly loaded content(images), I used the snippet above in AS 2.0 but how to do the same in AS 3.0?
__________________
"I haven't failed, I've just found out
10.000 ways that don't work."

~Thomas Edison~
unleash is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-08-2007   #9 (permalink)
photoshop ninja
 
agentxi's Avatar
 
Join Date: Oct 2006
Location: Red Deer - ish, alberta
Posts: 512

Quote:
To center something that is aligned to the left is pretty simple, you just need to think a little differently about what's going on. Say you have a Movie Clip centered vertically and horizontally on the Stage. Well, the top-left corner, where the registration point is, is located a little off-center. In fact, it is located at the center (which equals half the width of the Stage), minus half the Movie Clip's width and minus half the Movie Cli's height. So to center that with ActionScript, you simply place it:

myMovieClip._x = (Stage.width/2) - (myMovieClip._width/2);
myMovieClip._y = (Stage.height/2) - (myMovieClip._height/2);

Or, to center one Movie Clip within another (like an image within a frame):

mcImg._x = mcFrame._x + ((mcFrame._width/2)-(mcImg._width/2));
mcImg._y = mcFrame._y + ((mcFrame. _height/2)-(mcImg. _height/2));
i found this snippet from another forum

Just don't tell tamlin i went elsewhere for information
__________________

Your a Graphic Designer...If you could go back in time you wouldn't go back to see the rise and fall of civilizations, you'd go back in time to destroy comic sans and papyrus.
agentxi is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-08-2007   #10 (permalink)
Just unleashed!
 
unleash's Avatar
 
Join Date: Jul 2005
Location: Inbetween
Posts: 2,198
Blog Entries: 9

hmm, I had that part solved...but that is AS 2.0,
and AS 3.0 isn't responding that well to that code

I will have another go at it, maybe an update tomorrow...
__________________
"I haven't failed, I've just found out
10.000 ways that don't work."

~Thomas Edison~
unleash is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Rotating Images to obtain quality results. Rydium-41 Adobe Photoshop 5 12-25-2006 05:23 PM
Identifying Fake Images Man1c M0g Announcements 0 08-24-2005 10:16 PM
Overlapping Images: Putting images on top of another jasonchan483 Adobe Photoshop 5 07-30-2005 11:29 AM
Help: Making images links (it isn't what you think...read) kp606-Epsilon Adobe Photoshop 2 07-15-2004 02:14 PM
blending two external images into each other LimitLess Flash & Dynamic Media 20 07-04-2004 07:53 PM


All times are GMT +1. The time now is 01:15 AM.
Content Relevant URLs by vBSEO 3.2.0

Design & Content © BioRUST 2007 :: PRIVACY STATEMENT :: LEGAL INFORMATION :: ADVERTISING MEDIA KIT