The problem is this: the flash size is just too heavy because I can't load more than one image dynamically into my movie clips during runtime.
Secondly, I can't load my movie clips sequentially (that is, one after another), all the movie clips seem to load at the same time and I don't want that to happen.
The solution to both your problems is that you need to have a repository like an array and make a counter and two functions, one function will load the images and call the 2nd function when the image loads completely, the 2nd function increments the counter and calls the 1st function. Something like the following:
Code:
var ctr:Number=0;
var myArr:Array=["1.jpg","2.jpg","3.jpg"];
var mcLoader:MovieClipLoader=new MovieClipLoader();
var listener:Object=new Object();
function loadImage(){
listener.onLoadInit(){
incrementCounter();
}
mcLoader.addEventListener(listener);
mcLoader.loadClip(myArr[ctr],myMc);
}
function incrementCounter(){
ctr++;
loadImage();
}
Bookmarks