Highlighted

Animate goes to the next scene but stops on first frame instead of playing whole scene...

New Here ,
Jun 19, 2019

Copy link to clipboard

Copied

I have a series of scenes that are button-activated one after another.  The first four scenes play exactly as they are supposed to do.  A button at the end of each scene activates the next scene.  However when the play goes to scene 5, play stops on the first frame of this scene.  This scene is no different than the other scenes.  There is a stop action, but it is at the end of the scene.  I even took out that action script for this scene.  Playback does the same thing.  When it reaches this scene it stops on the first frame.  If I program the button in scene 4 and tell it to go to another scene other than 5, the playback also stops on the first frame of that next scene.

Has anyone else experienced this behavior?

David,

Now I had a chance to look a little more into your file and your problem.

And I've got it running now! I uploaded my modified version to https://adobe.ly/2WWZrZs.

Let me tell you first: You shouldn't be using Scenes. Instead develop your 'scenes' as seperate fla/swf files and load/unload them as SWF into a lead FLA document.

There is a snippet in ActionScript => Load and Unload => Click to Load/Unload SWF or Image. For a more handcoded spproach with steeper learning curve you could look into the AS3 Classes Loader and LoaderInfo. In my AS3 past the tutorials of RepublicOfCode have often helped me to get on with more complex AS3 subjects. So there is an introductory tutorial on Using the AS3 Loader Class.

This approach gives you smaller file sizes, easier editing through smaller units and more flexibility in setting up/combining trainings from a pool of SWFs.

The general disadvantages of Scenes are nicely summarized under How to work with scenes in Animate CC . See "Disadvantages of scenes".

Okay, back to your file.

In your fifth scene (Log-In to MasterControl) was an error. You've added an EventListener to an object which didn't  exist (in that frame).

button_2goingcopy4.addEventListener(MouseEvent.CLICK, fl_ClickToGoToScene_5);

Instead it should be

button_2_forgoingscene3.addEventListener(MouseEvent.CLICK, fl_ClickToGoToScene_5);

This might have been the sole culprit. I'm not sure though. Because this error occured first in frame 1650 and doesn't fully explain why the playhead stopped already in frame 98 (your test setting) and as well in frame 1. 

What I additionally did was to delete all reduntant frames in each scene (apart from the very last) which followed after your frames with stop() and gotoAndPlay() code to navigate to the next scene. These were in some cases several thousand frames. Pardon me, but this is madness to work so sloppy.

And I renamed your scenes (again apart from the very last one) to more descriptive titles in Window = Scene. This of course was not a real problem, I mention it in case you wonder about the new naming policy in my modified file linked above. Nevertheless take it as a suggestion from me.

Hope this helps

Klaus

Views

272

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

Animate goes to the next scene but stops on first frame instead of playing whole scene...

New Here ,
Jun 19, 2019

Copy link to clipboard

Copied

I have a series of scenes that are button-activated one after another.  The first four scenes play exactly as they are supposed to do.  A button at the end of each scene activates the next scene.  However when the play goes to scene 5, play stops on the first frame of this scene.  This scene is no different than the other scenes.  There is a stop action, but it is at the end of the scene.  I even took out that action script for this scene.  Playback does the same thing.  When it reaches this scene it stops on the first frame.  If I program the button in scene 4 and tell it to go to another scene other than 5, the playback also stops on the first frame of that next scene.

Has anyone else experienced this behavior?

David,

Now I had a chance to look a little more into your file and your problem.

And I've got it running now! I uploaded my modified version to https://adobe.ly/2WWZrZs.

Let me tell you first: You shouldn't be using Scenes. Instead develop your 'scenes' as seperate fla/swf files and load/unload them as SWF into a lead FLA document.

There is a snippet in ActionScript => Load and Unload => Click to Load/Unload SWF or Image. For a more handcoded spproach with steeper learning curve you could look into the AS3 Classes Loader and LoaderInfo. In my AS3 past the tutorials of RepublicOfCode have often helped me to get on with more complex AS3 subjects. So there is an introductory tutorial on Using the AS3 Loader Class.

This approach gives you smaller file sizes, easier editing through smaller units and more flexibility in setting up/combining trainings from a pool of SWFs.

The general disadvantages of Scenes are nicely summarized under How to work with scenes in Animate CC . See "Disadvantages of scenes".

Okay, back to your file.

In your fifth scene (Log-In to MasterControl) was an error. You've added an EventListener to an object which didn't  exist (in that frame).

button_2goingcopy4.addEventListener(MouseEvent.CLICK, fl_ClickToGoToScene_5);

Instead it should be

button_2_forgoingscene3.addEventListener(MouseEvent.CLICK, fl_ClickToGoToScene_5);

This might have been the sole culprit. I'm not sure though. Because this error occured first in frame 1650 and doesn't fully explain why the playhead stopped already in frame 98 (your test setting) and as well in frame 1. 

What I additionally did was to delete all reduntant frames in each scene (apart from the very last) which followed after your frames with stop() and gotoAndPlay() code to navigate to the next scene. These were in some cases several thousand frames. Pardon me, but this is madness to work so sloppy.

And I renamed your scenes (again apart from the very last one) to more descriptive titles in Window = Scene. This of course was not a real problem, I mention it in case you wonder about the new naming policy in my modified file linked above. Nevertheless take it as a suggestion from me.

Hope this helps

Klaus

Views

273

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 19, 2019 0
Advocate ,
Jun 20, 2019

Copy link to clipboard

Copied

Hi David

Do you perhaps use gotoAndStop() instead of gotoAndPlay() on your button in scene 4?

Otherwise please share your file with us (CC, Google Drive, Dropbox, WeTransfer etc). It's hard to find the problem just from your description.

Klaus

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 20, 2019 0
Advocate ,
Jun 22, 2019

Copy link to clipboard

Copied

David,

Now I had a chance to look a little more into your file and your problem.

And I've got it running now! I uploaded my modified version to https://adobe.ly/2WWZrZs.

Let me tell you first: You shouldn't be using Scenes. Instead develop your 'scenes' as seperate fla/swf files and load/unload them as SWF into a lead FLA document.

There is a snippet in ActionScript => Load and Unload => Click to Load/Unload SWF or Image. For a more handcoded spproach with steeper learning curve you could look into the AS3 Classes Loader and LoaderInfo. In my AS3 past the tutorials of RepublicOfCode have often helped me to get on with more complex AS3 subjects. So there is an introductory tutorial on Using the AS3 Loader Class.

This approach gives you smaller file sizes, easier editing through smaller units and more flexibility in setting up/combining trainings from a pool of SWFs.

The general disadvantages of Scenes are nicely summarized under How to work with scenes in Animate CC . See "Disadvantages of scenes".

Okay, back to your file.

In your fifth scene (Log-In to MasterControl) was an error. You've added an EventListener to an object which didn't  exist (in that frame).

button_2goingcopy4.addEventListener(MouseEvent.CLICK, fl_ClickToGoToScene_5);

Instead it should be

button_2_forgoingscene3.addEventListener(MouseEvent.CLICK, fl_ClickToGoToScene_5);

This might have been the sole culprit. I'm not sure though. Because this error occured first in frame 1650 and doesn't fully explain why the playhead stopped already in frame 98 (your test setting) and as well in frame 1. 

What I additionally did was to delete all reduntant frames in each scene (apart from the very last) which followed after your frames with stop() and gotoAndPlay() code to navigate to the next scene. These were in some cases several thousand frames. Pardon me, but this is madness to work so sloppy.

And I renamed your scenes (again apart from the very last one) to more descriptive titles in Window = Scene. This of course was not a real problem, I mention it in case you wonder about the new naming policy in my modified file linked above. Nevertheless take it as a suggestion from me.

Hope this helps

Klaus

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 22, 2019 0