Skip to main content
Inspiring
February 25, 2007
Answered

Help needed (of course) with scenes

  • February 25, 2007
  • 5 replies
  • 634 views
I've trying to use a button to go to a new scene, I when I use it on a new document, it works fine. But when I use it on a pre-made ".fla" document, It just goes to back to the 1st frame of the current scene.
Please help me.
This topic has been closed for replies.
Correct answer kglad
don't use scenes to navigate and don't use the goto functions. use the goto methods and frame labels:

5 replies

kglad
Community Expert
Community Expert
February 25, 2007
you're welcome.
kglad
Community Expert
Community Expert
February 25, 2007
again, use the goto methods and frame labels. the code in your previous message is correct. now, just click on the first frame in scene 2 and in the properties panel type in the frame label box type: scene2_frame1.
wandera89Author
Inspiring
February 25, 2007
Thank You soooooo much. Now I can countinue. Akthough when I first used the code, I restarted the scene one again. SO I change it to on
(press) {
_root.gotoAndStop("scene2_frame1"); }

Thank you once again.
kglad
Community Expert
Community Expert
February 25, 2007
if that code fails, it's because you have no frame labeled "scene2_frame1" on your _root timeline.
wandera89Author
Inspiring
February 25, 2007
How do you acess the _root timeline, and change scenes then?
kglad
Community Expert
Community Expert
February 25, 2007
the code i gave shouldn't be attached directly to an object. if you want that code to execute when your object undergoes an onPress etc event, put in an onPress etc handler.
wandera89Author
Inspiring
February 25, 2007
Here is the action script I put in, but nothing happend. I've tried it other documents as well.



wandera89Author
Inspiring
February 25, 2007
I've also tried to input the comand to go to scene 2 frame 1, but it just restarts scene 1. Same thing happened when I typed in scene 3.
kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
February 25, 2007
don't use scenes to navigate and don't use the goto functions. use the goto methods and frame labels:

wandera89Author
Inspiring
February 25, 2007
Unfortunately, I'm quite new at this and so I don't get what you mean. What options are there besides scenes, and "goto" command. And in the current settings, inputting "_root.gotoAndPlay("scene2_frame1");" merely brings up the error message

"**Error** Symbol=sprite 91, layer=Layer 7, frame=379:Line 1: Statement must appear within on handler
_root.gotoAndPlay("scene2_frame1");"