I want to make a custom container, usable in MXML like:
<local:MyContainer>
<s:Label/>
<s:Button/>
...
</local:MyContainer>
...but I'd like to be able to catch when the children are added so that I can control stuff like when & where they're added.
I tried overriding addChild(), addChildAt(), addElement(), addElementAt(), (extending the Group class) but they only fire when you add elements specifically with those functions - the application launches and the label, button, etc, end up in MyContainer without calling these functions.
How do I control the addition of sub-components via MXML? Am I on the wrong track - should I be writing a custom layout and/or skin instead?