Groups | Blog | Home
all groups > macromedia flash sitedesign > november 2005 >

macromedia flash sitedesign : Roll Over --> Movie Clip Plays



owengot
11/26/2005 2:58:08 PM
I don't know much actionscript at all, but I guess it's what I need to make
this thing work:

I want the user to roll over a button/object that says for example : "about"
and on the roll over, it plays a movie clip with a box and text fading in.
However (this is where I'm stuck), once you have rolled over, I want it so you
can move the mouse off the button/object, and the movie clip will stay on it's
last frame (the box & text).

I could just make a massive HIT area for the button, but this means that
anywhere you have your mouse in the window, it will start playing the movie
clip. So actionscript is needed.

There's an example of what I want to do here: http://www.owengot.com/about.html

Thanks for all your help flash experts!

owen
DwarvenLord
11/27/2005 12:00:00 AM
Make the box with the text a symbol, adding the command "stop();" on its last
frame.
Put both symbols on the stage.
Call the about button about_mc.
Call the box box_mc.
Click the frame in the timeline.
Open up the actionscript panel.
Type:
about_mc.onRollOver = function() {
box_mc.play();
};

And that should be it.
owengot
11/27/2005 1:29:09 PM
DwarvenLord,

Thanks for the help, this works great!

Just a few precisions to add (for people like me who run into this problem) :

- the stop action has to be at the last frame of the movie clip but also on
the first frame so the movie clip doesn't play as soon as the site loads

- instance names + symbol names have to have the same names used in the
actionscript (is that right?)

Thanks again you rock!

owen:D
AddThis Social Bookmark Button