# gotoAndPlay syntax

**URL:** <https://forum.kirupa.com/t/gotoandplay-syntax/116896>\
**Category:** Uncategorized\
**Created:** [July 22, 2004, 9:45am UTC](https://forum.kirupa.com/t/gotoandplay-syntax/116896 "2004-07-22T09:45:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![NeoDreamer](https://avatars.discourse-cdn.com/v4/letter/n/ccd318/32.png) [@NeoDreamer](https://forum.kirupa.com/u/NeoDreamer)\
**Post date:** [July 22, 2004, 9:45am UTC](https://forum.kirupa.com/t/gotoandplay-syntax/116896/1 "2004-07-22T09:45:54Z")

</div>

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

```auto

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

```

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

```auto

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

```

Why?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 22, 2004, 9:50am UTC](https://forum.kirupa.com/t/gotoandplay-syntax/116896/2 "2004-07-22T09:50:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 22, 2004, 9:56am UTC](https://forum.kirupa.com/t/gotoandplay-syntax/116896/3 "2004-07-22T09:56:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 22, 2004, 9:58am UTC](https://forum.kirupa.com/t/gotoandplay-syntax/116896/4 "2004-07-22T09:58:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 22, 2004, 10:10am UTC](https://forum.kirupa.com/t/gotoandplay-syntax/116896/5 "2004-07-22T10:10:48Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 22, 2004, 10:15am UTC](https://forum.kirupa.com/t/gotoandplay-syntax/116896/6 "2004-07-22T10:15:08Z")

</div>

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

```auto

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

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 22, 2004, 10:17am UTC](https://forum.kirupa.com/t/gotoandplay-syntax/116896/7 "2004-07-22T10:17:10Z")

</div>

> [@NeoDreamer](#):
>
> 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 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?  
😉
