This content has been marked as final. Show 2 replies
I am pretty sure that Flex transitions can only be used in association with Flex STATES. (Anyone, please correct me if I am incorrect on this ;-)
However, Flex transitions are collections of effects. And effects can be applied to the view components within ViewStacks. This achieves, in many cases, much the same result as transitions with states.
I have put up a demo example at the following link (with right-click "View Source" enabled):
The example at the link above modifies the example for <mx:ViewStack> in the Flex 3 Language Reference here:
The differences between the two are that my example creates two instances of <mx:Fade>, fadeOut and fadeIn. And these effects are then set on each of the view components that are children of the ViewStack, as follows:
Again, please go to the sample link above and right-click for "View Source" to see the code in context.
Note: The fades are not being applied to the text in the examples above. To have Fade (and Rotate) effects work on text, the fonts used for that text must be embedded. For more detail on this, see the heading "Using embedded fonts with effects" at this doc link:
You can also use composite effects using <mx:Parallel>and <mx:Sequence>.
For a more complex example of applying effects on ViewStack children see the following example by Stephen Downs (a.k.a. Tink):
PairedStackEffect (Fade & Squash)
Note: The link above has a runnable example, and provides the code via a right-click "View Source"
Please post back regarding whether the above answers your question, and if you find it helpful :-)
Thanks a lot Greg
Your first code is pretty enough as a solution.
Thanks once again