I'm adding a child via mxml e.g AddChild. I'm wondering how I
go about knowing when the child has been added. I want to call a
function when it has. I saw the 'added' method but I'm not quite
sure how it works. Do I need to create a listener?
TeotiGraphix, Nov 17, 2007 6:54 AM
var numberOfChildren:uint = componentName.numChildren;
componentName.getChildIndex(child'sName); //If this returns
-1, the child is not there.
if(componentName.getChildByName(child'sName) != null)...
If you want to know for sure if the child is really in there!
After checking, if true, then call a function, else, return.