gotoAndPlay syntax

When I use the code below, my movie works fine.


on (release) {
	_level1.gotoAndPlay("frameLabel");
}

But when I use this code, my movie doesn’t work.


on (release) {
	_level1.gotoAndPlay("sceneName","frameLabel");
}

Why?

Try without the _level1. before it, just gotoAndPlay(“sceneName”,“frameLabel”);

This is a command to play a SWF above the current SWF. So I do need the _level1, right?

An SWF above your current SWF would be in the same scene. Use _level1.gotoAndPlay(framenumber) then. Always keep in mind that scenes are evil. Avoid them at all costs. It is known that gotoAndPlay is pain to use with scenes.

It is easier to edit particular sections of a movie if the movie is split up into different scenes. That way if you make something last longer in one area of the movie, you don’t have to shift anything after that change.

I don’t get it. This code doesn’t work either. I just keep on pressing my button, and the scene doesn’t change.


on (release) {
	_level1.nextScene();
}

i think it’s depen on what u called movie.
a movie clip contains only a dynamic text is a movie
and, a movie clip contains 10 movie clips, 15 dynamic texts, 10 buttons is a movie too…
no?
:wink: