# Another external swf preloader question

**URL:** https://forum.kirupa.com/t/another-external-swf-preloader-question/208059
**Category:** Uncategorized
**Created:** [November 24, 2006, 2:22pm UTC](https://forum.kirupa.com/t/another-external-swf-preloader-question/208059 "2006-11-24T14:22:44Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![admsh](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@admsh](https://forum.kirupa.com/u/admsh)
#### Post date: [November 24, 2006, 2:22pm UTC](https://forum.kirupa.com/t/another-external-swf-preloader-question/208059/1 "2006-11-24T14:22:44Z")

</div>

so i have a site with a few external swfs and i want to preload everything from the very begining, external files AND container-movie.  
all the code i can find preloads the external files once a button has been pressed or something of that sort, which is not good for me.

i have two pieces of code, can anyone tell me which of these is better, and how to modify them so everything is loaded from the begining?

external swfs preloader:

```auto
var mcl:MovieClipLoader = new MovieClipLoader();

var mclL:Object = new Object();

mclL.onLoadProgress = function(target, loaded, total) {
    loader.percent.text = Math.round((loaded/total)*100)+"%";
    this.loadBar._height = getPercent*450;
}

```

current movie preloader:

```auto
bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loadBar._height = getPercent*450;
this.loadText = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
    this.gotoAndPlay(3);
}

```

:trout:
