Groups | Blog | Home
all groups > flash actionscript > june 2006 >

flash actionscript : controlling a loaded MC on mouseOut


Akhenaton0000
6/25/2006 4:52:23 PM
Button question.

I have 9 buttons, each button loads a movie clip (animation) that corresponds
to that button. Each movie clip fades in. I want that movie clip to also fade
out on mouse out and I don't know how to do that.

Instead of doing that I have the movie clip unload on mouseout, that's all
that I figured out so far. Any help would be much appreciated.



www.conceptualdesign.net/controlingTheLoadedMovie.gif
http://www.conceptualdesign.net/nathanMD/flash/flash.html
deven_delian20031977
6/25/2006 5:34:01 PM
Hi

For each button you must have created different swf files. instead of doing
that you create movieclips for each image with the animation of fadeIn and
fadeOut. and give the 2 label names at the start frame of the each effect (i.e.
start frame of fadeIn effect and start frame of fadeOut) and give stop at the
end frame of each effect. and on the frame 1 of the whole movieclip so nothing
will be displayed when ur movie starts. then on rollOver call the label on
start frame of ur fadeIn effect and on rollOut call the label on the start
frame of ur fadeOut effect. chk below.

MovieClip 1. suppose say my_mc (instance name of movieclip)

inside movieclip u will have tween animation have certain frames with the
fadeIn and fadeOut effect. say 1-10 frames for fadeIn and 11-20 for fadeOut.

At the start frame of fadeIn effect give stop() action and label name (eg.:
label1) then at the end frame of the same effect give stop() action.
the same way give the label name (eg.: label2) at the start frame of the
fadeOut effect but here don't give stop action it should be at the end frame.

this way u create n no. of movieclips for each image and give instance name.

Action for buttons.

on(rollOver){
instancename.gotoAndPlay("label1");
}
//
on(rollOut){
instancename.gotoAndPlay("label2");
}

thats it.
have a gr8 day.:cool;
AddThis Social Bookmark Button