hey everyone,
i’m loading my images in using MovieClipLoader and i’m showing my loading times with a preloader…which all works fine…but i’m wanting to minimalize my code by the following:
-
I want each image that gets loaded to have it’s own preloader. In total there will be approx max 30 images mayb 40.
-
If possible how would i through all those 30 clips into an array and call them as i need them for each preloader like a very dynamic script for doing this
Anybody have any ideas on which way would be the best method??
if you need any more info just ask and i’ll post!
Cheers all
atm my code looks like this.
[AS]
var oListener:Object = new Object();
oListener.onLoadStart = function (samp1img1_holder:MovieClip):Void {
status = (samp1img1 + " Started Loading.");
};
oListener.onLoadProgress = function(samp1img1_holder:MovieClip, nLoaded:Number, nTotal:Number):Void {
getPercent = nLoaded/nTotal;
_root.loadbar._width = getPercent*150;
if (nLoaded == nTotal) {
status = “success”
}
//status = (samp1img1_holder + “loaded” + nLoaded + “of” + nTotal + “bytes”);
};
oListener.onLoadInit = function(samp1img1_holder:MovieClip):Void {
status = (samp1img1_holder + "initialized “);
};
oListener.onLoadComplete = function(samp1img1:MovieClip):Void {
status = (samp1img1_holder + " completed loading”);
};
myimgloader.addListener(oListener);
[/AS]
Cheers