Can anyone please tell me why when I use attachMovie with some initObjects and then use loadClip to load something into the attached movie, the initObjects get dropped/undefined?
[COLOR="Blue"]var[/COLOR] mclListener:Object = [COLOR="Blue"]new Object()[/COLOR];
mcLoader.[COLOR="Blue"]addListener[/COLOR](mclListener);
mc.[COLOR="Blue"]attachMovie[/COLOR]("emptyMC", "thumb"+i, mc.[COLOR="Blue"]getNextHighestDepth()[/COLOR], {pieceName:thumbName});
trace(mc["thumb"+i].pieceName); [COLOR="Gray"]//outputs the pieceName correctly, even when mc["thumb"+i] is made into a button with a *'trace(this.pieceName)'* on it.[/COLOR]
mcLoader.[COLOR="Blue"]loadClip[/COLOR]("thumb.jpg", mc["thumb"+i]);
mclListener.[COLOR="Blue"]onLoadInit[/COLOR] = [COLOR="Blue"]function[/COLOR](mc:[COLOR="Blue"]MovieClip[/COLOR]) {
trace(mc); [COLOR="Gray"]//outputs *mc* correctly.[/COLOR]
trace(mc.pieceName); [COLOR="Gray"]//outputs *'undefined'*.[/COLOR]
}
many thanks!