# loadMovieNum(); to a new SCENE

**URL:** <https://forum.kirupa.com/t/loadmovienum-to-a-new-scene/22010>\
**Category:** flash\
**Created:** [May 29, 2003, 4:39am UTC](https://forum.kirupa.com/t/loadmovienum-to-a-new-scene/22010 "2003-05-29T04:39:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![markcq](https://avatars.discourse-cdn.com/v4/letter/m/2acd7d/32.png) [@markcq](https://forum.kirupa.com/u/markcq)\
**Post date:** [May 29, 2003, 4:39am UTC](https://forum.kirupa.com/t/loadmovienum-to-a-new-scene/22010/1 "2003-05-29T04:39:22Z")

</div>

hey guys

i’m using the loadMovieNum(); to load external swf files into my main movie…

is there any way that i could use that action and direct it to play a certain scene within the loaded movie…

example… i have the main movie called main.swf

from main.swf i put a button and on the button i give the action:

on(release){  
loadMovieNum(“page.swf”,2);  
}

this will load the new movie onto level two inside main.swf, right?

is there anything i could ad to that to make it load the 3rd scene of page.swf… or would i have to tear the whole project up and seperate all the scenes as seperate external files?

---

<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:** [May 29, 2003, 6:45am UTC](https://forum.kirupa.com/t/loadmovienum-to-a-new-scene/22010/2 "2003-05-29T06:45:42Z")

</div>

It actually loads the movie into level 2 of the flash “player”, not the main swf… just for the record. There are subtle differences.

Instead of scenes, try using frame labels. Find the place where you want the movie to goto, create a frame label layer if you don’t already have one. Set a frame label like “startingFrame”.

Then you can use code like

\_level2.gotoAndPlay(“startingFrame”);

---

<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:** [May 29, 2003, 11:04am UTC](https://forum.kirupa.com/t/loadmovienum-to-a-new-scene/22010/3 "2003-05-29T11:04:34Z")

</div>

for the record \_level2.gotoAndPlay(3); will do exactly the same as \_level2.gotoAndPlay(“scene3”,1);

the question is where do i put this \_level2.gotoAndPlay(“startingFrame”);???

the AC i have now will load the movie into LEVEL 2 OF THE FLASH PLAYER, and what then??? i can’t say:

on(release){  
loadMovieNum(“page.swf”,2);  
\_level2.gotoAndPlay(3);  
}

it doesn’t work… all my “pages” that are loaded goes onto level2, so they actually replace eachother.

so i’m sitting on a “page” (already on level2)… now i click the button on THAT “page”… its going to execute the script in THAT order… first it loads the new “page”, and… oops! the rest of the script is gone… meaning no new frame label or new scene.

you see my problem?

thanx for the try 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:** [May 29, 2003, 12:16pm UTC](https://forum.kirupa.com/t/loadmovienum-to-a-new-scene/22010/4 "2003-05-29T12:16:19Z")

</div>

you could use a global variable…

```auto
on (release) {
_global.frame = 3;
loadMovieNum("page.swf", 2);
}

```

then put this script in the first frame of page.swf

```auto
if (frame) this.gotoAndPlay(frame);

```

😉

---

<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:** [May 30, 2003, 4:08pm UTC](https://forum.kirupa.com/t/loadmovienum-to-a-new-scene/22010/5 "2003-05-30T16:08:37Z")

</div>

this one sounds like it could work…

thanx… 🙂 🙂 🙂

---

<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:** [May 30, 2003, 4:09pm UTC](https://forum.kirupa.com/t/loadmovienum-to-a-new-scene/22010/6 "2003-05-30T16:09:44Z")

</div>

no problem. =)
