External swf preloader error

What in this AS is causing my entire movie to reset whenever this preloader is reached? This is placed on a mc:

[AS]
onClipEvent (load) {
_root.stop();
medialoader.loadMovie(“media.swf”);
this.topScale = this._width;
this._xscale = 0;
ft = int(medialoader.getBytesTotal()/1024);
}
onClipEvent (enterFrame) {
fl = int(medialoader.getBytesLoaded()/1024);
this._xscale = (fl/ft)this.topScale;
PERCENT = fl/ft;
_root.TEXT = Math.round(PERCENT
100)+"%";
if (fl == ft) {
_root.gotoAndPlay(_currentframe+1);
play();
}
}
[/AS]

Any clues as to what is wrong?

What’s preventing it from continually going through that ‘enterFrame’ code even after the preloader is finished? Seems like it would just keep hitting-

    _root.gotoAndPlay(_currentframe+1);
    play();

over and over… :toad: