El problema es que cuando estoy clicando en el mc1 son cargados el mc0 y el mc2.
Código ActionScript :
mc1.addEventListener( MouseEvent.CLICK, CLICK );
mc2.addEventListener( MouseEvent.CLICK, CLICK );
mc3.addEventListener( MouseEvent.CLICK, CLICK );
mc4.addEventListener( MouseEvent.CLICK, CLICK );
var YENDO:Sprite = new Sprite();
addChild ( YENDO );
var profundidad:int;
function CLICK ( e:MouseEvent ):void
{
profundidad = getChildIndex(e.currentTarget as MovieClip);
trace ( "Profundidad: " + profundidad );
subir();
}
function subir():void
{
for ( var i:int = 0; i <= profundidad; i++ )
{
YENDO.addChild( getChildAt( i ) );
trace ( "i: "+ i );
}
verificar();
}
function verificar():void
{
trace ( "YENDO numChildren :" + YENDO.numChildren );
for ( var i:int = 0; i <= profundidad; i++ )
{
trace ( YENDO.getChildAt( i ).name );
}
}
Desde ya muchas gracias por la ayuda. Claudio
