# Loading random SWF's and IE 7 issues

**URL:** <https://forum.kirupa.com/t/loading-random-swfs-and-ie-7-issues/234328>\
**Category:** flash\
**Created:** [August 1, 2007, 12:56pm UTC](https://forum.kirupa.com/t/loading-random-swfs-and-ie-7-issues/234328 "2007-08-01T12:56:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![g\_rochford](https://avatars.discourse-cdn.com/v4/letter/g/c57346/32.png) [@g\_rochford](https://forum.kirupa.com/u/g_rochford)\
**Post date:** [August 1, 2007, 12:56pm UTC](https://forum.kirupa.com/t/loading-random-swfs-and-ie-7-issues/234328/1 "2007-08-01T12:56:57Z")

</div>

Hi all

I am using this code to load in a bunch of random swf files onto my stage to create a sort of star field effect, but with words instead of dots and it doesnt work in IE 7. Can anybody explain why, or recommend a better solution. It works in all other browsers IE 6 Safari 2 and 3 Firefox Opera etc. I am using a Mac btw so i can only tell from what people are telling me.

you can see it in action here [http://www.gregrochford.co.uk/charles](http://www.gregrochford.co.uk/charles)

```auto
var mc = this.createEmptyMovieClip("mc", 1);
function nextRandom() {
    var swf = this._url.substr(0, this._url.lastIndexOf("/")+1)+"swf/image"+Math.floor(Math.random()*26)+".swf";
    mc.loadMovie(swf);
}
nextRandom();
this.onEnterFrame = function() {
    if (mc._currentframe>=mc._totalframes) {
        nextRandom();
    }
};

```

on a side note, does anybody know the code to remove the “mc” from the stage when the user goes back to the beginning? i thought it was this

```auto
mc.clear();

```

but that doesnt work.

Many thanks

Greg
