I’m a newbie who needs some help!
I am using the MovieClipLoader class to externally load a .swf file with a preloader. The problem is that my .swf starts playnig behind the preloader, before it is completely loaded…
How can I make it paly only after it is 100% loaded?
Here is what I have so far:
var loader:MovieClipLoader = new MovieClipLoader();
var loadHandler:Object = new Object();
myGlobalSound = new Sound(this);
loader.addListener(loadHandler);
bar_mc._xscale = 0;
holder_mc._visible = false;
// what should happen when the jpg/swf is completely loaded
loadHandler.onLoadInit = function(_mc:MovieClip) {
bar_mc._visible = false;
text_mc._visible = false;
_mc._visible = true;
_mc._xscale = 100;
_mc._yscale = 100;
_mc.init();
myGlobalSound.setVolume(100);
};
// what should happen while the jpg/swf is loading
loadHandler.onLoadProgress = function(_mc:MovieClip, loaded:Number, total:Number) {
bar_mc._xscale = loaded / total * 100;
myGlobalSound.setVolume(0);
_mc.init();
};
// start loading specified jpg/swf into blank movieclip holder_mc on stage
loader.loadClip("bubbles.swf", holder_mc);
Thanks!