I need access to the properties of a file I load on the next line. Specifically, trying to pull the _height and _width off of it.
I think it’s being bungled up because it’s inside a function running two (nested) for statements. Let me post up the code for you geniuses:
function(){
for(i=0; i<someNumber; i++){
for(r=0; r<anotherNumber; r++){
//tn the temp var/identifier for a movieclip which
//gets created here
mcLoader.loadClip(this["gallery"+i].filenames_tn[r], tn);
tn._x = tnb._x = tnm._x = spacingHolder;
spacingHolder += tn._width + spacing;
}
}
}
//elsewhere
var loader:Object = new Object();
mcLoader.addListener(loader);
loader.onLoadInit = function (mc){
trace(mc._width) //this works fine
}
The width traces fine in the onLoadInit, but only AFTER the function that is creating and positioning the movieclips is finished running. They are nested in something of a complicated heirarchy so to save the widths in another array and then try to move them all later would be bonkers.
Again, I need the _width property off the images just loaded so that I can space them properly.
Anybody?