October 15, 2010 at 4:33 PM
State: The State class defines a view state, a particular view of a component. For example, a product thumbnail could have two view states; a base view state with minimal information, and a rich view state with additional information. The overrides property specifies a set of child classes to add or remove from the base view state, and properties, styles, and event handlers to set when the view state is in effect.
The syntax of state in flex4 are following :
1. View Stack is to handle different MXML file eg TAB control and states is the transition within single MXML file.
2. ViewStack should be used were there is complete change in the controls used and States should be used when you just want to add or remove a few components based on certain conditions.
3. ViewStates are virtual state of an existing page apearing at an instance i.e. only one state can be shown at a time while viewStack are collection of different view containers which can be shown at a time.