Preloader all encompassing

I’ve created a base swf file that loads quite a few different files (multiple swf, jpg, and xml) but I don’t want anything to display without everything else having loaded. This is what I’ve used in the past. Let me know if you have any better alternatives. Thanks.

sound_pl.onEnterFrame = function() {
filesize = _root.sound_pl.getBytesTotal();
loaded = _root.sound_pl.getBytesLoaded();
preloader_mc._visible = true;
if (loaded != filesize) {
preloader_mc._xscale = 100*loaded/filesize;
} else {
preloader_mc._visible = false;

	if (_root.sound_pl._alpha<100) {
		_root.sound_pl._alpha += 10;
	}
}

};

you simply do something based on the following…

for instance, you’re loading 2 Movie Clips; MC1 and MC2. you want it to do something only when both Movie Clips are loaded…

like your function above


MC1.onEnterFrame = function() {
BT = _root.MC1.getBytesTotal();
BL = _root.MC1.getBytesLoaded();
if (BT != BL) {
//your loading progress thingy here
} else {
_root.check1 = 1;

}
};

same with MC2, but you do a (_root.check2 = 1)

then


if(_root.check1==1; and _root.check2==2;){
//do something
}

hope you understand me :slight_smile: i know that i suck at explaining my points :stuck_out_tongue:

and dont double post

what? who’s double posting?