Buttons In A Movie Not Working with Scenes?

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!!

I don’t know why this happens? Any idea why?.

Thanks!!.

Jeyyu.:toad:

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
(-:

That won’t work either Freddy.

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]

Good to know. I try not to use scenes. If it was all in one scene, would it work then?

If it is all in one scene then yes it will work. It just doesn’t work across scenes because of the way Flash handles scenes.

I try not to use scenes either, they are evil.

Here here. Thank you for letting me know. I do not want to be a ‘giver of false info’.
(-:

It worked. Thanks Guys. Do u always use _root when assigning actions to reference the main movie or only in specific scenarios.

Yeah, scenes suck, but I am just exprimenting right now. I would probably use loadMovie() in real examples.

Thanks again.

jeyyu.

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.