HELP!
I’ve built a Preloader using the MovieClipLoader to load an external .swf into a blank container on another page.
the problem I am having is that the movie will begin to play before it’s loaded and before the preloader has completed. I cannot for the life of me figure out why the movie doesn’t wait to play until the whole swf has download. Please HELP, I would be very grateful.
here’s the action script i’m using, anybody see what the problem is?!
[COLOR=DarkRed]var myMCL:MovieClipLoader = new MovieClipLoader();
var myListener:Object = new Object();
myMCL.addListener(myListener);
myListener.onLoadProgress = function(target_mc:MovieClip, bytesLoaded:Number, bytesTotal:Number) {
var loaded:Number = Math.round((bytesLoaded/bytesTotal) * 100);
progressBar.gotoAndStop(loaded);
}
myListener.onLoadComplete = function (target_mc:MovieClip) {
progressBar._visible = false;
}
myListener.onLoadStart = function (target_mc:MovieClip) {
progressBar._visible = true;
}
myMCL.loadClip(“main.swf”, “container”);
[/COLOR]
thank you!!!