# External swf preloader error

**URL:** <https://forum.kirupa.com/t/external-swf-preloader-error/185539>\
**Category:** Uncategorized\
**Created:** [April 14, 2006, 1:15am UTC](https://forum.kirupa.com/t/external-swf-preloader-error/185539 "2006-04-14T01:15:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![salimai](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@salimai](https://forum.kirupa.com/u/salimai)\
**Post date:** [April 14, 2006, 1:15am UTC](https://forum.kirupa.com/t/external-swf-preloader-error/185539/1 "2006-04-14T01:15:29Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![flextnet](https://avatars.discourse-cdn.com/v4/letter/f/7ba0ec/32.png) [@flextnet](https://forum.kirupa.com/u/flextnet)\
**Post date:** [April 14, 2006, 3:26am UTC](https://forum.kirupa.com/t/external-swf-preloader-error/185539/2 "2006-04-14T03:26:32Z")

</div>

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:
