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

flash actionscript : two mc actions with one press



kris
9/2/2004 11:53:14 PM
I want to create a flash site with 5 buttons (A,B,C,D,E). Each buttons is
connected to a movieclip.
When I press button "B" then movieclip B comes from the rightside in the
head scene in the middle. That action I create with on (release)
{_root'name'mc.gotoandplay();} but then...
When I press another button "E", then I want that the movieclip, who's at
that moment on the head scene, goes left away and the new movieclip "E"
comes from the right side.

blenz
9/3/2004 2:57:51 AM
function moveMovies (btnName)
{
this[btnName].gotoAndPlay("movingForward"); //this moves corresponding
movie to centre

if(lastBtn!=undefined)
{
this[lastBtn].gotoAndPlay("movingBack"); //this moves the previous
movie back
}
lastBtn=btnName // setting the current clicked btn as the lastBtn clicked
for next btn actions

}
AddThis Social Bookmark Button