# Loading and unloading moviesclips in different levels

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

}
