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

flash actionscript : Basic "on rollover" question


elniche11
6/19/2004 7:10:27 PM
I'm new to Flash--still using Flash 5.
If I create a series of buttons in a scene on one side of the page how do I
make an image appear that corresponds to that button on the vacant side?
Example:
Button #1 (on rollover) image #1 appears (then disappears when the mouse is no
longer over)
when the mouse moves to another button, that image appears.
I've created the buttons but I'm not sure if the images that correspond should
be movies in the same scene or another scene.
I would appreciate any help.
Thanks.


kglad
6/19/2004 8:56:33 PM
you can do that with attachMovie(). convert your images to movieclips and give
them linkage id's. put an empty movieclip in the spot where you want your
images to appear and then attached to your buttons you can use:

on(rollOver){
yourDepth++;
yourMTMC.attachMovie("yourlinkageID","newName",yourDepth);
}
on(rollOut){
yourMTMC.attachMovie("anotherMTMC_ID","newName",yourDepth); // create another
empty movieclip and give it a linkageiID to be used on rollOut

initialize yourDepth.
AddThis Social Bookmark Button