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:
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:
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: