Hi there!
I just can’t figure out how to use a preloader script for multiple loaders displaying at the same time. And I also just don’t understand the target movieclip parameter for onLoadProgress. What is this parameter suppose to be?
The movieclip beeing loaded according to Macromedia but if you put mc.swf it gives you an error so it should be mc then or what? I thought I could use this parameter to kind of target and tell flash what file it was suppose to listen to and then control what preloader to start but it just doesn’t work. Also what is the function of this parameter - I just don’t get it… When I use the script below the loader starts for every file loaded into a listener called myMCL but I would like to have different preloaders that can be seen at the same time.
For example a preloaderbar for background loading and another one for content loading etc. How can I achieve this using something similar to this code…
myListener.onLoadError = function (target){
bkgMCL.loadClip(“error/error.swf”, bkg);
_root.gotoAndPlay(28);
};
myListener.onLoadStart = function (target){
this.bkgPreloader._visible = true;
}
myListener.onLoadProgress = function(target:MovieClip, loadedBytes:Number, totalBytes:Number){
var preloadPercent = Math.round((loadedBytes/totalBytes)*100);
_root.bkgPreloader.gotoAndStop(preloadPercent);
};
myListener.onLoadComplete = function(target){ //loading contents after bkg loaded
this.bkgPreloader._visible = false;
};