# Loading multiple external .swfs into random empty movieclips

**URL:** <https://forum.kirupa.com/t/loading-multiple-external-swfs-into-random-empty-movieclips/268516>\
**Category:** Uncategorized\
**Created:** [August 14, 2008, 8:09pm UTC](https://forum.kirupa.com/t/loading-multiple-external-swfs-into-random-empty-movieclips/268516 "2008-08-14T20:09:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![moldero](https://avatars.discourse-cdn.com/v4/letter/m/58956e/32.png) [@moldero](https://forum.kirupa.com/u/moldero)\
**Post date:** [August 14, 2008, 8:09pm UTC](https://forum.kirupa.com/t/loading-multiple-external-swfs-into-random-empty-movieclips/268516/1 "2008-08-14T20:09:29Z")

</div>

I have 20 external .swfs im trying to load into 20 blank movieclips .  
i am trying to load them randomly into each blanck movieclip without the external .swf’s duplicating.

so far I have this code

```auto

// define blank mc array
mcarray = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12",
"13", "14", "15", "16", "17", "18", "19", "20"];
// define external .swf array
swfarray = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12",
"13", "14", "15", "16", "17", "18", "19", "20"];
// calculate random index for blank mc array
randommc = random(mcarray.length);
// calculate random index for external .swf array
randomswf = random(swfarray.length);
//load random swf into random mc
loadMovie((swfarray[randomswf])+".swf",
"_level0.ui_mc.content.win.portfolio.ui_"+(mcarray[randommc]));

```

But this code only loads 1 random .swf into 1 random empty movie clip.

Im trying to load all the movieclips with all the external .swfs without any  
of the .swf’s repeating. Any help would be greatly appreciated.
