Possible to access all Movie clips on a layer, on timeline, through stage ?

Posted by azislo on Stack Overflow See other posts from Stack Overflow or by azislo
Published on 2011-01-16T15:00:07Z Indexed on 2011/01/16 18:53 UTC
Read the original article Hit count: 146

I have a code ...

var selection:Array = new Array();
var diplayObjCont:* = stage;

// The rectangle that defines the selection in the containers coordinate space.

// Loop throught the containers children.
for(var a:int; a<diplayObjCont.numChildren; a++){
    // Get the childs bounds in the containers coordinate space.
    var child:DisplayObject = diplayObjCont.getChildAt(a);
    selection.push(child);
}


trace(selection);

that returns just

[object MainTimeline]

So, can I access layers on this MainTimeline to get all Movie Clips on this layer ? So I can do a simple operation "A_1_2.buttonMode = true;" to all my MC's (in an array for example) without writing every line (lot of MC's on layer and lot of lines).

© Stack Overflow or respective owner

Related posts about flash

Related posts about actionscript-3