Skip to main content
March 24, 2009
Answered

link to scene

  • March 24, 2009
  • 2 replies
  • 548 views
I'm a bit confused, I'm new at this coding thing. I have a button inside a movie that's inside another movie in my Scene. (Scene 1, named Interiors). When I click that button I want to go to Scene 2.

My (Scene 2) is named Exteriors.
My button code is:

on (release) {
_root.gotoAndPlay("Exteriors");
}


Can someone please tell me what I'm doing wrong?
This topic has been closed for replies.
Correct answer Ned Murphy
Try:

on (release) {
_root.gotoAndPlay("Exteriors", 1);
}

2 replies

Ned Murphy
Legend
March 25, 2009
If it's no longer in a separate scene, just use the frame reference...

on (release) {
_root.gotoAndPlay(10);
}
March 25, 2009
Well now, don't I feel like a jackass. That was so obvious I overlooked it. Thanks.
Ned Murphy
Legend
March 25, 2009
You're welcome... we all have those moments
Ned Murphy
Ned MurphyCorrect answer
Legend
March 24, 2009
Try:

on (release) {
_root.gotoAndPlay("Exteriors", 1);
}
March 24, 2009
Nope, that did not work.
Ned Murphy
Legend
March 24, 2009
I had to doublecheck to make sure I wasn't using the AS3 version, which switches the positions of the arguments for some silly reason, but what I provided is the AS2 version.

The only other advice I can offer is to not use scenes... use one scene with movieclips and/or things spread along a timeline. Scenes can be problematic, and that's the best I can say for them.