# Load / Unload FLAs- please help

**URL:** https://forum.kirupa.com/t/load-unload-flas-please-help/260083
**Category:** Uncategorized
**Created:** [May 12, 2008, 2:20pm UTC](https://forum.kirupa.com/t/load-unload-flas-please-help/260083 "2008-05-12T14:20:13Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![abhikumar](https://avatars.discourse-cdn.com/v4/letter/a/67e7ee/32.png) [@abhikumar](https://forum.kirupa.com/u/abhikumar)
#### Post date: [May 12, 2008, 2:20pm UTC](https://forum.kirupa.com/t/load-unload-flas-please-help/260083/1 "2008-05-12T14:20:13Z")

</div>

I am loading external SWFs on my main flash file.

For every External SWFs:  
They also have multiple levels. There is a base SWF and then 5 levels of other external SWFs there.

So- i load an external SWF on my main flash and that external SWF also has its own external SWFs.

This is how i do that:  
on my main flash file… i create a blank MC:  
**this.createEmptyMovieClip(“blank1”, this.getNextHighestDepth());**  
Now, by default i load my first external MC there (ExtMC1)  
**\_root.blank1.loadMovie(“ExtMC1.swf”);**

Now i have a button (Button2) and when it should be clicked- it should replace ExtMC1 with ExtMC2.  
**\_root.blank1.loadMovie(“ExtMC2.swf”);**  
This just don’t work because it does replace the base file for ExtMC1 but the external SWFs within ExtMC1 remains on the main flash file…

so i use this instead:  
**button2.onRelease = function() {  
unloadMovieNum(1);  
unloadMovieNum(2);  
unloadMovieNum(3);  
unloadMovieNum(4);  
unloadMovieNum(5);  
\_root.blank1.loadMovie(“ExtMC2.swf”);  
};**  
so basically i clear all the levels first and then load my second MC (ExtMC2.swf).  
similarly to load my third MC i use this on button 3:

**button3.onRelease = function() {  
unloadMovieNum(1);  
unloadMovieNum(2);  
unloadMovieNum(3);  
unloadMovieNum(4);  
unloadMovieNum(5);  
\_root.blank1.loadMovie(“ExtMC3.swf”);  
};**  
is there any better way of doing the same- it does work but the issue is, when the first MC (ExtMC1) is loading and click on the button 2 to load the second MC (ExtMC2) - it takes a lot of time… so i need an effective way of doing the same… please help.

---

<div class="post-metadata">

### Author: ![abhikumar](https://avatars.discourse-cdn.com/v4/letter/a/67e7ee/32.png) [@abhikumar](https://forum.kirupa.com/u/abhikumar)
#### Post date: [May 12, 2008, 2:52pm UTC](https://forum.kirupa.com/t/load-unload-flas-please-help/260083/2 "2008-05-12T14:52:08Z")

</div>

also, u can view this in action at [www.junkdesign.com](http://www.junkdesign.com) - this will give u better idea what im looking for.
