for (var s = 0; s<matFabrics.length; s++) {
var currentSubPicture = matFabrics[s];
var currentSubThumb = materialSection.createEmptyMovieClip(“subthumb_mc”+s, s);
var containerSubThumb = currentSubThumb.createEmptyMovieClip(“subcontainer”+s, s);
currentSubThumb.attachMovie(“subthumb_bg_mc”,“subthumb_bg_mc”+s,s-1);
if (s<4) {
destThumbX = sthumb_space;
destThumbY = 0thumb_rowspace;
} else if (3<s and s<8) {
destThumbX = (sthumb_space)-(4thumb_space);
destThumbY = 1thumb_rowspace;
} else if (7<s and s<12) {
destThumbX = (sthumb_space)-(8thumb_space);
destThumbY = 2thumb_rowspace;
} else if (11<s and s<16) {
destThumbX = (sthumb_space)-(12thumb_space);
destThumbY = 3thumb_rowspace;
} else if (15<s and s<20) {
destThumbX = (sthumb_space)-(16thumb_space);
destThumbY = 4thumb_rowspace;
}
easeName(destThumbX,destThumbY,currentSubThumb);
var mcl:MovieClipLoader = new MovieClipLoader();
mcl.loadClip(currentSubPicture.attributes.thumb,containerSubThumb);
var container:Object = new Object();
mcl.addListener(container);
container.onLoadProgress = function(target:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void {
var ld = target.attachMovie("temp_loader","temp_loader"+s,s+2);
ld._xscale = 10;
ld._yscale = 10;
};
container.onLoadInit = function(target:MovieClip) {
target._x = target._x-(target._width/2);
target._y = target._y-(target._height/2);
};
basically this does a fine job of loading in my thumbs… Now I want to had a little preloader mc on every thumb as they load. what i have now doesnt work. I guess the only variable that is taken is target. Which is the container.
Do I put a forloop in the loadProgress and somehow count how many containers there are?