# \[Flash8\]Help needed! multi random load

**URL:** https://forum.kirupa.com/t/flash8-help-needed-multi-random-load/227722
**Category:** flash
**Created:** [June 1, 2007, 2:37pm UTC](https://forum.kirupa.com/t/flash8-help-needed-multi-random-load/227722 "2007-06-01T14:37:06Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![rormac](https://avatars.discourse-cdn.com/v4/letter/r/cab0a1/32.png) [@rormac](https://forum.kirupa.com/u/rormac)
#### Post date: [June 1, 2007, 2:37pm UTC](https://forum.kirupa.com/t/flash8-help-needed-multi-random-load/227722/1 "2007-06-01T14:37:06Z")

</div>

Can anyone please help …

I have created a flash movie which has four windows which I want to display randomly loaded swf’s at the same time … that part I have managed to patch together

my problem is as each mc randomly selects from one series of swf’s they often load the same swf to multiple windows

I would also like to make sure that each window does not load the same swf consecutively.

I think I need to get each mc to pull the files from an array and for each window to know what the other has selected so i don’t get duplicate swf’s loading at the same time …

I haven’t got a clue of how to do this??? so please help - I am not very clued up with code!!

Cheers rormac

heres what I have been working with - probably not done very well … mmmmm

script

```auto

filename = ["ad1c.swf", "ad2c.swf", "ad3c.swf", "ad4c.swf", "ad5c.swf", "ad6c.swf", "ad7c.swf", "ad8c.swf", "ad9c.swf", "ad10c.swf", "ad11c.swf", "ad12c.swf", "ad13c.swf", "ad14c.swf", "ad15c.swf"];
path = "";
i = filename.length;
k = Math.floor(Math.random()*i);
loadMovie(path+filename[k], movieTarget1);
filename = ["ad1c.swf", "ad2c.swf", "ad3c.swf", "ad4c.swf", "ad5c.swf", "ad6c.swf", "ad7c.swf", "ad8c.swf", "ad9c.swf", "ad10c.swf", "ad11c.swf", "ad12c.swf", "ad13c.swf", "ad14c.swf", "ad15c.swf"];
path = "";
i = filename.length;
k = Math.floor(Math.random()*i);
loadMovie(path+filename[k], movieTarget2);
filename = ["ad1c.swf", "ad2c.swf", "ad3c.swf", "ad4c.swf", "ad5c.swf", "ad6c.swf", "ad7c.swf", "ad8c.swf", "ad9c.swf", "ad10c.swf", "ad11c.swf", "ad12c.swf", "ad13c.swf", "ad14c.swf", "ad15c.swf"];
path = "";
i = filename.length;
k = Math.floor(Math.random()*i);
loadMovie(path+filename[k], movieTarget3);
filename = ["ad1c.swf", "ad2c.swf", "ad3c.swf", "ad4c.swf", "ad5c.swf", "ad6c.swf", "ad7c.swf", "ad8c.swf", "ad9c.swf", "ad10c.swf", "ad11c.swf", "ad12c.swf", "ad13c.swf", "ad14c.swf", "ad15c.swf"];
path = "";
i = filename.length;
k = Math.floor(Math.random()*i);
loadMovie(path+filename[k], movieTarget4);

```

Cheers again!
