Hi!
I am trying to use MovieClipLoader with voetsjoebas tutorial on making Transitions between external swf’s. I want to display a preloader whenever an external swf is loading but I don’t success with this.
Here is the code I have been trying to use:
var mclListener:Object = new Object();
var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(mclListener);
mclListener.onLoadProgress = function(target:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void {
var getPercent:Number = bytesLoaded/bytesTotal;
loader_txt.text = Math.round(getPercent*100)+"%";
}
mclListener.onLoadInit = function()
{
loader_txt.text = "";
}
menu.myButton_mc.onRelease = function() {
if (_root.currMovie == undefined) {
_root.currMovie = "swf1";
_root.mcLoader.loadClip("swf1.swf", _root.container);
} else if (_root.currMovie != "swf1") {
if (_root.container._currentframe >= _root.container.midframe) {
_root.currMovie = "swf1";
_root.container.play();
}
}
}
I appreciate if anyone can help me with this one.
-sumo-