Could you give a bit more specific description of what you're trying to do?
If I understood your question correctly, you'ld be interested by the "getChildByName()" method that most containers have..
Sure. I am working on a complex application that involves several ViewStacks, several Accordions, some checkboxes, some radio buttons, some text boxes. These components are scattered about, but all are children of a base class that is successfully enumerated by
var classInfo:XML = describeType(vwstk);
Suppose I write a loop as follows:
for each (var a:XML in classInfo..accessor)
Inside that loop I have a series of tests like
Then, I iterate thru all of the children of the base class as in:
Inside the if I persist the checked/not checked status of the checkbox.
The tricky part is going from the string a.@name to the Object reference u. I doubt my proposed method will work. Do you have a better idea?
I'm sorry I didn't quite follow the exact issue, but here are a couple general tips that might apply.
If an instance of a component is instantiated with mxml and has a value set for the "id" attribute ("myVBox"), you can get a reference to it via bracket notation:
"[this]" is the parent of the component, and the id sting can of course be in a variable.
That all presumes you ualready have an instance of the class.
To create a class from its string name use getDefintionByName:
See the docs for a good example.