Remove Movieclip

Hi all

I’m using this actionscript to call some various .swf files randomly into my main movie file to create a sort of starfield effect of words.

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();
    }
};

However it doesnt seem to work in IE 7. Does anybody know why? or even better a good solution.

Greg