# Play next scene from within movie symbol

**URL:** https://forum.kirupa.com/t/play-next-scene-from-within-movie-symbol/113205
**Category:** Uncategorized
**Created:** [June 15, 2004, 9:39pm UTC](https://forum.kirupa.com/t/play-next-scene-from-within-movie-symbol/113205 "2004-06-15T21:39:11Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![NeoDreamer2](https://avatars.discourse-cdn.com/v4/letter/n/7feea3/32.png) [@NeoDreamer2](https://forum.kirupa.com/u/NeoDreamer2)
#### Post date: [June 15, 2004, 9:39pm UTC](https://forum.kirupa.com/t/play-next-scene-from-within-movie-symbol/113205/1 "2004-06-15T21:39:11Z")

</div>

Flash MX

In a movie symbol, I put

```auto

_root.gotoAndPlay(nextSceneName, 1);

```

But the it won’t go to the next scene. What’s wrong with this code?

---

<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: [June 16, 2004, 6:01am UTC](https://forum.kirupa.com/t/play-next-scene-from-within-movie-symbol/113205/2 "2004-06-16T06:01:21Z")

</div>

had that same problem! I searched for hours on end, and just ended up redoing the whole thing ☹  
I think i heard somewhere that its a problem with the coding for flash, but im not sure though.

---

<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: [June 16, 2004, 1:21pm UTC](https://forum.kirupa.com/t/play-next-scene-from-within-movie-symbol/113205/3 "2004-06-16T13:21:55Z")

</div>

You’re right. I’ve tested extensively on what the problem is: it’s that exact line of code. If I replace that line with anything else, it will run that “something else.” So the problem shouldn’t be in the surrounding code or whatnot. Oh great, there goes my game for the Flash game contest.

---

<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: [June 16, 2004, 2:22pm UTC](https://forum.kirupa.com/t/play-next-scene-from-within-movie-symbol/113205/4 "2004-06-16T14:22:57Z")

</div>

I attached a very simple .fla that exemplifies the problem I have. In scene 1, I have a movie clip on frame 1 and a stop(); action on frame 1. At the end of this movie clip, I wrote:

```auto

_root.gotoAndPlay("Scene2",1);

```

You guessed it: it doesn’t work!

---

<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: [June 16, 2004, 2:23pm UTC](https://forum.kirupa.com/t/play-next-scene-from-within-movie-symbol/113205/5 "2004-06-16T14:23:48Z")

</div>

This is probably a extremely wrong way to get around this, but you could get around this by setting a variable in the movieclip like:

```auto

goToNext = "yes";

```

And on the main timeline keep checking for it:

```auto

this.onEnterFrame = function () {

if (goToNext == "yes") {
gotoAndPlay(nextSceneName, 1);
delete this.onEnterFrame;
}

}

```

---

<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: [June 16, 2004, 3:39pm UTC](https://forum.kirupa.com/t/play-next-scene-from-within-movie-symbol/113205/6 "2004-06-16T15:39:07Z")

</div>

I solved the problem. Some people on Flashkit told me that you can’t do this style of targeting within a movie clip. You just have to write \_root.gotoAndPlay(“framelabel”); without the scene name. Cubed, that should help you too.

---

<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: [June 16, 2004, 4:11pm UTC](https://forum.kirupa.com/t/play-next-scene-from-within-movie-symbol/113205/7 "2004-06-16T16:11:32Z")

</div>

> [@NeoDreamer](#):
>
> I solved the problem. Some people on Flashkit told me that you can’t do this style of targeting within a movie clip. You just have to write \_root.gotoAndPlay(“framelabel”); without the scene name. Cubed, that should help you too.

Seems like a much better approach than what I suggested hehe.

ghjr
