While trying to sort out a problem with loading components and firing events based on that, I came across a question for which I could not find an answer online.
Following is a sample of reference code
<s:WindowedApplication>
<s:states>
<s:State name="login"/>
<s:State name="data"/>
</s:states>
<s:VGroup id="login" includeIn="login">
<s:HGroup id="loginHGroup">
</s:HGroup>
</s:VGroup>
<s:VGroup id="data" includeIn="data">
<s:VGroup id="v1">
<s:HGroup id="h11">
</s:HGroup>
<s:HGroup id="h12">
</s:HGroup>
</s:VGroup>
<s:VGroup id="v2">
<s:HGroup id="h21">
</s:HGroup>
</s:VGroup>
</s:VGroup>
</s:WindowedApplication >
Now if I want to fire an event after the last UI component 'data' state gets created - which element do I fire it off from? Will HGroup h12 get created first or h21? What is the flow of element creation in Flex - does it follow DOM schematics or is there some other mechanism?
[Remember that I cannot fire creationComplete at WindowedAPplication level as that is going to get fired when the login state is created].
creationCompleteevent, but if you want to know when the state is finished changing, use currentStateChange. - RIAstar