# External preloader problem

**URL:** <https://forum.kirupa.com/t/external-preloader-problem/110819>\
**Category:** Uncategorized\
**Created:** [May 20, 2004, 2:10am UTC](https://forum.kirupa.com/t/external-preloader-problem/110819 "2004-05-20T02:10:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![macneilslt](https://avatars.discourse-cdn.com/v4/letter/m/aeb1de/32.png) [@macneilslt](https://forum.kirupa.com/u/macneilslt)\
**Post date:** [May 20, 2004, 2:10am UTC](https://forum.kirupa.com/t/external-preloader-problem/110819/1 "2004-05-20T02:10:48Z")

</div>

Hey, i have this preloader for loading external files, it works pretty good, except i’m having a problem…

Check this: [http://www.falloutbmx.com/layout2/layout2.html](http://www.falloutbmx.com/layout2/layout2.html)

It’s not done, but press the main button just for testing purposes, it loads a video, here is where the problem is, the video appears before the preloader is done loading…i can’t figure out why…

here is the AS for the preloader:

```auto

_root.bar._visible = 0;
_root.barBorder._visible = 0;

MovieClip.prototype.loadPic = function(pic) {

this.loadMovie(pic);
this._parent.onEnterFrame = function() {
var t = media.getBytesTotal(), l = media.getBytesLoaded();
bar._visible = 1;
barBorder._visible = 1;
per = Math.round((l/t)*100);
if (t != 0 && Math.round(l/t) == 1 && media._width != 0) {

bar._visible = 0;
barBorder._visible = 0;
loadText3.text = "";
delete this._parent.onEnterFrame;
} else {
bar._width = per * 2;
loadText3.text = per+" % loaded";
}
};
};

```

adapted from the resizing image thing…anyone know why the movie being loaded is appearing before its done loading?

also, the sound is messed up after loading them, why would that cause a problem with the sound? these are the same vids i used before, and the sound is fine…
