I asked about it in some other forums, and I made a class that displays structure of any DisplayObjectContainer. Here it is:
package {
import flash.utils.*;
public class Debug{
public static var sChildren:Array = new Array();
public static function structure(object:* = null, detailedTrace:Boolean = false):void {
var sClass:Array = getQualifiedClassName(object).split("::");
var sSuper:Array = getQualifiedSuperclassName(object).split("::");
var display:String = "
" + object.toString().toUpperCase() + " class: " + sClass[1];
var details:String = (detailedTrace) ? " in the package: " + sClass[0] + ".* " : "";
details += (detailedTrace) ? " Subclass of: " + sSuper[1] : "";
details += (detailedTrace) ? ", package: " + sSuper[0] + ".*" : "";
display += details + "
";
display += object.toString().toUpperCase() + " instance name: '" + object.name + "', has " + object.numChildren + " children:
";
for (var i:int=0; i<object.numChildren; i++) {
var cClass:Array = getQualifiedClassName(object.getChildAt(i)).split( "::");
display += "_level " + i + "___";
display += "name: '" + object.getChildAt(i).name + "' class: " + cClass[1];
details = (detailedTrace) ? ", package: " + cClass[0] + ".*" : "";
details += (detailedTrace) ? " type: " + object.getChildAt(i) : "";
display += details + "
";
if (object.getChildAt(i).hasOwnProperty("numChildren")) {
sC hildren.push(object.getChildAt(i));
}
}
trace(display);
if (sChildren.length >0) {
var oNext:*;
oNext = sChildren.shift();
structure(oNext);
}
}
}}
without formatting of output text, it would look like this:
package {
import flash.utils.*;
public class Debug{
public static var sChildren:Array = new Array();
public static function structure(object:* = null, detailedTrace:Boolean = false):void {
for (var i:int=0; i<object.numChildren; i++) {
if (object.getChildAt(i).hasOwnProperty("numChildren")) {
sChildren.push(object.getChildAt(i));
}
}
trace(display);
if (sChildren.length >0) {
var oNext:*;
oNext = sChildren.shift();
structure(oNext);
}
}
}}
Just import and call with Debug.structure(object:any DisplayObjectContainer, false or true for detailed description) hope, it helps (: