updateComplete

The updateComplete event is dispatched from all UIComponents after they have been through the validation phase in the rendering lifecycle. It is called after the commitProperties(), measure(), and updateDisplayList() methods have been called.

This method will only be called when the component is invalidated. Some components will not be invalidated very often during their lifecycle if their size is constant and they do not perform rendering updates or have their properties changing. Other components, however, will dispatch this event quite often as they respond to user input or other events to update themselves.

Problem:

You have some custom initialization that you need to perform every time a component is added using a State, such as setting focus in a particular field. You need a reliable method of determining that the component has been added.

Solution:

There are two solutions that I've found to work in this case. This first is to add a new public method to the component called activate() and then call it from a handler on the enterState Event. The second is to listen to the addedToStage and updateComplete events, set a flag in addedToStage that you check in updateComplete to run your initialization.

Here is the code, example app, and more detailed explanation.

Search Great Flex/Flash Sites