# Loading/Unloading External .swfs

**URL:** <https://forum.kirupa.com/t/loading-unloading-external-swfs/225834>\
**Category:** flash\
**Created:** [May 16, 2007, 3:27am UTC](https://forum.kirupa.com/t/loading-unloading-external-swfs/225834 "2007-05-16T03:27:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maroneyi](https://avatars.discourse-cdn.com/v4/letter/m/779978/32.png) [@Maroneyi](https://forum.kirupa.com/u/Maroneyi)\
**Post date:** [May 16, 2007, 3:27am UTC](https://forum.kirupa.com/t/loading-unloading-external-swfs/225834/1 "2007-05-16T03:27:18Z")

</div>

So I have an .fla with code on it which loads an external swf into a blank movie clip with the instance name box3.

```auto
filename = ["2_1.swf", "2_2.swf", "2_3.swf"];
path = "";
i = filename.length;
k = Math.floor(Math.random()*i);
loadMovie(path+filename[k], box3);

```

That works just fine.

On each of the swfs loaded I want to place a code to unload them and have them replaced (unloading may be an unnecessary step) with a new swf from the array.

I can’t for the life of me figure out how to do it.  
I could really use the help of you gifted actionscripters out there.  
-Ian
