Hello Everyone:
I know the subject line sounds weird. but this is the scenario:
I have 2 Scenes: Scene 1 and Scene 2.
In Scene 2, I created a movie clip with some buttons like
link 1 | link 2 | link 3 | back to Main |
so these are all buttons inside a movie clip called mov1
The back to Main button inside the movie clip is supposed to go back to previous scene. I had some code like
on (release) {
gotoAndPlay(“Scene 1”, 1);
};
but It did not work. After tearing my hair and ****ing the computer for a bit, I deleted the back to Main button from the movie clip and created a separate button on Scene 2 (as apposed to a button on a movie clip and using the clip on scene 2) called “Back to Main” right next to Link 3 and same code as above and It works!!
If your commands are nested in a movieClip, you may have to tell Flash to go back to the main movie. Try:
[AS]
on (release) {
_root.gotoAndPlay(“Scene 1”, 1);
};
[/AS]
Hope that helps
(-:
You have to give your your first frame in the scene you want to go to a frame label (right click on the frame and open the properties panel), then with the gotoAndPlay you have to target the main timeline of that movie and play the label [AS]_root.gotoAndPlay(“frameLabelYouUsed”);[/AS]
You use _root to get back the very first timeline in the hierarchy.
In a single movie this is the main timeline, but when you call in a movie via loadMovie() the _root timeline is the very first timeline of the main movie and not of the loaded movies. So in that case you will need to use _parent or “this” (no quotes), depending on how your stuff is set up it is different usage.