# \[FMX\] - using movieclips to switch between scenes

**URL:** <https://forum.kirupa.com/t/fmx-using-movieclips-to-switch-between-scenes/62734>\
**Category:** flash\
**Created:** [August 30, 2004, 11:17pm UTC](https://forum.kirupa.com/t/fmx-using-movieclips-to-switch-between-scenes/62734 "2004-08-30T23:17:28Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adambiz](https://avatars.discourse-cdn.com/v4/letter/a/d6d6ee/32.png) [@Adambiz](https://forum.kirupa.com/u/Adambiz)\
**Post date:** [August 30, 2004, 11:17pm UTC](https://forum.kirupa.com/t/fmx-using-movieclips-to-switch-between-scenes/62734/1 "2004-08-30T23:17:28Z")

</div>

Hello,

Does anybody know a way to move through different scenes using movieclips? As far as I know, you have to use gotoAndPlay(scene, frame) on a button.

thanks!  
adam.

---

<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:** [August 30, 2004, 11:30pm UTC](https://forum.kirupa.com/t/fmx-using-movieclips-to-switch-between-scenes/62734/2 "2004-08-30T23:30:32Z")

</div>

I don’t understand your question… what are these “scenes” you talk about? 😛

Lol, you could just place that same action on a frame somewhere inside the Movie Clip.

Oh and try not to use scenes 😉 .

_Edit: I forgot to mention that if you’re going to place the Script inside a Movie Clip, remember to identify the level… your script would look like this:_[AS]\*\*\_root.\*\*gotoAndPlay(“frameLabel”);[/AS]

---

<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:** [August 31, 2004, 12:02am UTC](https://forum.kirupa.com/t/fmx-using-movieclips-to-switch-between-scenes/62734/3 "2004-08-31T00:02:09Z")

</div>

I hate to be a troublemaker,  
but,  
and I know this might sound silly,  
It doesn’t work on movieclips.

I use the same simple code line **gotoAndPlay(“scene 2”, 1)**, both in a movieclip, and in a button. the movieclip simply doesn’t work. when trying to add **\_root** it doesn’t work for either one.

The reason I need to move to another scene from a movieclip, is that I have to do it from whithin an onEnterFrame.

and what’s wrong with scenes, anyway? 😉

thanks a lot!  
adam.

---

<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:** [August 31, 2004, 12:09am UTC](https://forum.kirupa.com/t/fmx-using-movieclips-to-switch-between-scenes/62734/4 "2004-08-31T00:09:52Z")

</div>

Hmmm, post your script the exact way it looks in your movie?

Oh yeah, scenes, ask anyone here and they’ll tell you the same thing… don’t use them! :lol:

---

<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:** [August 31, 2004, 12:24am UTC](https://forum.kirupa.com/t/fmx-using-movieclips-to-switch-between-scenes/62734/5 "2004-08-31T00:24:47Z")

</div>

here we go.  
please, someone, anyone, this is driving me crazy…🙂

adam.

---

<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:** [August 31, 2004, 6:58pm UTC](https://forum.kirupa.com/t/fmx-using-movieclips-to-switch-between-scenes/62734/6 "2004-08-31T18:58:12Z")

</div>

Still no solution?  
Please try to give it a look…

Thanks!  
adam.

---

<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:** [August 31, 2004, 6:59pm UTC](https://forum.kirupa.com/t/fmx-using-movieclips-to-switch-between-scenes/62734/7 "2004-08-31T18:59:22Z")

</div>

Save it for FlashMX, not 2004.

---

<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:** [August 31, 2004, 7:33pm UTC](https://forum.kirupa.com/t/fmx-using-movieclips-to-switch-between-scenes/62734/8 "2004-08-31T19:33:09Z")

</div>

here it is.

thanks!

---

<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:** [August 31, 2004, 7:39pm UTC](https://forum.kirupa.com/t/fmx-using-movieclips-to-switch-between-scenes/62734/9 "2004-08-31T19:39:25Z")

</div>

Okay, here you go.

What I did was I placed the actions (function) on the frame instead of the movie clip:[AS]movie.onPress = function() {  
gotoAndPlay(“Scene 2”);  
};[/AS] **movie** is the Instance Name of the Movie Clip.

---

<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:** [August 31, 2004, 7:51pm UTC](https://forum.kirupa.com/t/fmx-using-movieclips-to-switch-between-scenes/62734/10 "2004-08-31T19:51:45Z")

</div>

One more thing… if you’re going to use scenes :sigh:, use Frame Labels to target them, actually you should use Labels no matter what 😉 .

---

<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:** [August 31, 2004, 8:52pm UTC](https://forum.kirupa.com/t/fmx-using-movieclips-to-switch-between-scenes/62734/11 "2004-08-31T20:52:20Z")

</div>

That worked graet for me. thank you.

How did scenes get such a bad rep?

adam.

---

<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:** [August 31, 2004, 10:02pm UTC](https://forum.kirupa.com/t/fmx-using-movieclips-to-switch-between-scenes/62734/12 "2004-08-31T22:02:29Z")

</div>

You can’t depend on them… Flash can sometimes get mixed up with all those numbers (frames, scenes), which is why it’s better to use Frame Labels.

And you’re welcome. :}

---

<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:** [August 31, 2004, 10:04pm UTC](https://forum.kirupa.com/t/fmx-using-movieclips-to-switch-between-scenes/62734/13 "2004-08-31T22:04:21Z")

</div>

Also isn’t there more functionality available for movie clips vs. scenes?
