Skip to main content
Participating Frequently
December 16, 2023
Answered

Navigating to different scenes using buttons in Animate 2024

  • December 16, 2023
  • 2 replies
  • 799 views

Hi all,

I developed a project in ActionScript2 in CS5. I have now opened my project in Animate to change into AS3. My project has 186 scenes which all opened correctly in AS2 however now, in AS3, an error appears stating the scenes are not found.  I have tried just about everything I can think of, over several days, to get the buttons to navigate to their proper scenes, but still the error appears. Any help would be very much appreciated. Thank you. Cheers Frederick

 

This topic has been closed for replies.
Correct answer JoãoCésar17023019

Thanks for the feedback.

 

Ctrl + Alt + Enter is the shortcut for testing the current scene only. It means the other scenes aren't published.

 

You should use Ctrl + Enter only to test the whole movie.

2 replies

kglad
Community Expert
Community Expert
December 16, 2023

also, copy and paste here a screenshot of the error message.

Participating Frequently
December 16, 2023

ArgumentError: Error #2108: Scene Scene2 was not found.
at flash.display::MovieClip/gotoAndStop()
at SceneButtonChange_Scene1_fla::MainTimeline/fl_ClickToGoToAndStopAtScene()

kglad
Community Expert
Community Expert
December 16, 2023

copy and paste here a screenshot of your scenes panel.

JoãoCésar17023019
Community Expert
Community Expert
December 16, 2023

Hi.

 

Can you see the scenes using the Scene panel?

 

Which code are you using?

 

And what command are you using to test?

 

Please let us know.

 

Regards,

JC

Participating Frequently
December 16, 2023

Hi Joao,

Thank you so much for your reply.

I have made up a test movie with two scenes to work out the code to go from one scene to the other using a button in each scene.

Yes, both scenes appear in the scene panel.

This is the code I'm using:

 

button1_btn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtScene);
function fl_ClickToGoToAndStopAtScene(event:MouseEvent):void
{
gotoAndStop(1,"Scene2");
}

 

I'm using Ctrl + Alt + Enter to test.

 

Thank you,

Regards,

FS