Copy link to clipboard
Copied
hello there
i am using this code for multiple buttons in the same frame, the inicial frame, in order to jump to any other frame when i press the button...
button_name.addEventListener(MouseEvent.CLICK, launch_button1);
function launch_button1(event:MouseEvent):void
{
gotoAndPlay(1); // plays the current timeline from Frame 1 of Scene 1
}
is there an action for instead of going to frame to go to the scene......an action for scenes similar to this ?
also about the home button
whats the action script for home button to come back to the first scene?
anyone?
Copy link to clipboard
Copied
Hi.
Just add the scene name as the second paramater of the gotoAndPlay or gotoAndStop methods.
gotoAndPlay(1, "Scene 2");
The names of the scenes must be the ones you see in the Scene panel.
For the home button, you would pass 1 as the frame and the name of the first scene.
Regards,
JC
Find more inspiration, events, and resources on the new Adobe Community
Explore Now