Copy link to clipboard
Copied
Hello, I'm a relatively new animator still trying to figure out the ropes, especailly when it comes to actionscript. I am creating a simple interactive flash with 2 scenes and 2 buttons for navigating them. On the first scene i successfully put the code in for "go to next scene" into one button and "go to previous scene" in the other( which just starts scene 1 over again as i expected. However. When Try to assign these to the same buttons in scene 2 its like the script gets ignored and clicking the buttons does nothing. Anyone out there got any tips or know what I'm doing wrong? I am using animate CC, btw
Copy link to clipboard
Copied
What does your Actionscript code look like? How do you incorporate the code? Is there a reason you want to use scenes?
If the buttons are identical between the two scenes, then consider just having one scene, using the timeline to divide up what you have as scenes. Then you could have the buttons on one layer (just two for the whole timeline).
Copy link to clipboard
Copied
button_1.addEventListener(MouseEvent.CLICK, fl_ClickToGoToPreviousScene_11);
function fl_ClickToGoToPreviousScene_11(event:MouseEvent):void
{
MovieClip(this.root).prevScene();
}
I'm going to try what you said with one scene, thanks for that btw! However, is there anything in this code that is wrong? I took it directly from the "actionscript" folder
Copy link to clipboard
Copied
I don't know how things fare with Animate these days when it comes to using scenes, but back in the days of Flash, scenes were best avoided as they were frequently troublesome to navigate with no determinable reason why. So avoiding them just became a standard approach for a lot of people.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now