I have a straight forward script that loads 4 jpg's using the moviecliploader.
I'm loading each image into its own container. This works fine when the containers are created within the root level..
Code:
var mclListener:Object = new Object();
mclListener.onLoadInit = function(target_mc:MovieClip) {
trace(target_mc);
};
var myMC:MovieClipLoader = new MovieClipLoader();
myMC.addListener(mclListener);
images =new Array("h1", "h2", "h3", "h4");
for (n=0; n<images.length; n++) {
var im = _root.createEmptyMovieClip("pic"+n, this.getNextHighestDepth());
myMC.loadClip("images/"+images[n]+".jpg",im);
}
The "onLoadInit" handler traces all 4 containers and all images appear.
But when I try to great an intermediate container to hold the image containers like so:
Code:
test = _root.createEmptyMovieClip("t", this.getNextHighestDepth());
var mclListener:Object = new Object();
mclListener.onLoadInit = function(target_mc:MovieClip) {
trace(target_mc);
};
var myMC:MovieClipLoader = new MovieClipLoader();
myMC.addListener(mclListener);
images =new Array("h1", "h2", "h3", "h4");
for (n=0; n<images.length; n++) {
var im = test.createEmptyMovieClip("pic"+n, this.getNextHighestDepth());
myMC.loadClip("images/"+images[n]+".jpg",im);
}
The "onLoadInit" handler only traces the last image..and only the last image appears to be loaded.
Has anyone experienced this problem or have a solution?
Thanks a bunch!