# Loading and unloading moviesclips in different levels

**URL:** <https://forum.kirupa.com/t/loading-and-unloading-moviesclips-in-different-levels/62883>\
**Category:** Uncategorized\
**Created:** [September 1, 2004, 9:45am UTC](https://forum.kirupa.com/t/loading-and-unloading-moviesclips-in-different-levels/62883 "2004-09-01T09:45:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aaadar](https://avatars.discourse-cdn.com/v4/letter/a/eb8c5e/32.png) [@aaadar](https://forum.kirupa.com/u/aaadar)\
**Post date:** [September 1, 2004, 9:45am UTC](https://forum.kirupa.com/t/loading-and-unloading-moviesclips-in-different-levels/62883/1 "2004-09-01T09:45:50Z")

</div>

I’ve got a bit of a problem.

I’ve got a mainmovie.exe, which creates 4 emptymovieclips as containers  
all of the containers load an external movie

the one at the top with a menu/buttons  
I’d like the buttons when clicked to unload all the containers and reload the original lowest level movie from a particular frame. then it’ll go through the process of creating empty clips, and load each external movie again

But since I’m playing the movies in an exe. I dont know how to unload all the containers and start the root/lowest level movie from a particular frame of a particular scene.

The main movie is called mainmovie.exe, it creates containers 1 - to 4 as empty ,movie clips.

DOes its thing, reaches a particular frame and loads movies into into container 1 - to 3, and topcontainer. Topcontainer is the most important. It has the buttons/menu. WHen I put an “on release action” to unload all the other containers and gotoAndPlay root -\>frame 2, it doesnt work. It unloads everything, but wont load goto And Play.I’m left with a blank screen.

Help anyone?

So frame 2 of root mainmovie.exe

\_root.createEmptyMovieClip(“container3”,3);  
\_root.createEmptyMovieClip (“topcontainer”,4);  
setProperty(“container3”,\_x,901.5);  
setProperty(“container3”,\_y,662.1);  
setProperty(“topcontainer”,\_x,53.0);  
setProperty(“topcontainer”,\_y,0.0);  
container3.loadMovie(“main/beats.swf”,1);  
topcontainer.loadMovie(“main/top.swf”,1);

frame 60 of mainmovie.exe

\_root.createEmptyMovieClip(“container1”,1);  
\_root.createEmptyMovieClip(“container2”,2);

setProperty(“container1”,\_x,107.7);  
setProperty(“container1”,\_y,316.3);  
setProperty(“container2”,\_x,507.7);  
setProperty(“container2”,\_y,316.3);  
//unloadMovie(“container”);  
container1.loadMovie(“main/introleft.swf”,1);  
container2.loadMovie(“main/booksright.swf”,1);

button action of button in movie top.swf, loaded inside mainmovie.exe where there is an created emptyclip topcontainer

on (release)  
{  
\_root.unloadMovie(“container1”);  
\_root.unloadMovie(“container2”);  
\_root.unloadMovie(“container3”);

\_root.gotoAndPlay(“books”, 2);

}

---

<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:** [September 1, 2004, 1:32pm UTC](https://forum.kirupa.com/t/loading-and-unloading-moviesclips-in-different-levels/62883/2 "2004-09-01T13:32:35Z")

</div>

here are the flas

They’re massive. Still a beginner so forgive the size and arrangment.  
[[color=#800080]mainmovie[/color]](http://ace.rucus.net/misc/)  
[[color=#800080]topcontainer[/color]](http://ace.rucus.net/misc/)

---

<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:** [September 2, 2004, 12:01pm UTC](https://forum.kirupa.com/t/loading-and-unloading-moviesclips-in-different-levels/62883/3 "2004-09-02T12:01:48Z")

</div>

see

there’s the ROOT movie  
then |-\> container 1, level 1  
then |-\> container 2, level 2  
then |-\> container 3, level 3  
then |-\> topcontainer, level 4 ( which has the buttons)  
I want the buttons in the movie loaded into level 4 to make the rootmovie to go to and Play scene"books" from frame 2.  
Somehow the syntax isnt right cause even if I take out the unloads, the root.gotoAndPlay doesnt work  
Should I maybe load all the other movies into one level since they dont ovelap anyway ?  
If I’m calling a movie loadede into a container, at level 4, what should be the syntax to get the bottommost movie, root or level 0, to do its thing?  
Can I load the mainmovie.swf into \_root level? Cause it contains all the other movies. Whats the syntax for that?
