Forloop and MovieClipLoader

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 = 0
thumb_rowspace;
} else if (3<s and s<8) {
destThumbX = (sthumb_space)-(4thumb_space);
destThumbY = 1thumb_rowspace;
} else if (7<s and s<12) {
destThumbX = (s
thumb_space)-(8thumb_space);
destThumbY = 2
thumb_rowspace;
} else if (11<s and s<16) {
destThumbX = (sthumb_space)-(12thumb_space);
destThumbY = 3thumb_rowspace;
} else if (15<s and s<20) {
destThumbX = (s
thumb_space)-(16thumb_space);
destThumbY = 4
thumb_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?

this is a newer part.
container.currentThumb = currentSubThumb;
container.trackS = s;//stores the s value in container
container.onLoadProgress = function(target:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void {

		var loader = this.currentThumb.attachMovie("temp_loader", "temp_loader"+this.trackS, this.trackS+1);
		loader._xscale = 10;
		loader._yscale = 10;

		if (bytesLoaded == bytesTotal) {
			removeMovieClip(loader);
			trace(loader);
		}
	};

however it looks to me that only the first thumb is affected by it… any ideas?

ill just give you a link to see for yourselves.
try and max out your upload an download. then run it
http://adamgee.ca/hazelton/content-test.html

it doesnt affect all thumbs, but in a weird way. some thumbs arent some are. One at a time. its all random.

try a few times. sometimes it doesnt show up at all.

my brain is rotting

you need a loaderBar which recognizes only the targetMC its assigned to

I think you may stick a checking for loop in the loadProgress of the loadClip

which essentially sends off the data specific for targetMC to the loadBar element

shrugs