Highlighted

"go to previous scene" script not working on scene 2

Explorer ,
Jun 02, 2019

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

TOPICS
ActionScript

Views

310

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

"go to previous scene" script not working on scene 2

Explorer ,
Jun 02, 2019

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

TOPICS
ActionScript

Views

311

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jun 02, 2019 0
LEGEND ,
Jun 03, 2019

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).

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 03, 2019 0
Explorer ,
Jun 03, 2019

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 03, 2019 0
LEGEND ,
Jun 05, 2019

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 05, 2019 0