Bruce, The answer is yes, although it takes some
playing with to get it right J here is an example of a fading transition. The key
here is the RemoveChildAction effect and the AddChildAction effect in the
transition. These allow you to control when the RemoveChild and AddChild
state changes happen. You should be able to adapt this to your
example. <?xml version="1.0"
encoding="utf-8"?> <mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" currentState="vb1"> <mx:states> <mx:State
name="vb1"> <mx:RemoveChild
target="{vb2}" /> </mx:State> <mx:State
name="vb2"> <mx:RemoveChild
target="{vb1}" /> </mx:State> </mx:states> <mx:transitions> <mx:Transition
toState="vb1" fromState="*"> <mx:Sequence> <mx:Fade
target="{vb2}" alphaFrom="1" alphaTo="0" /> <mx:RemoveChildAction
target="{vb2}" /> <mx:AddChildAction
target="{vb1}" /> <mx:Fade
target="{vb1}" alphaFrom="0" alphaTo="1" /> </mx:Sequence> </mx:Transition> <mx:Transition
toState="vb2" fromState="*"> <mx:Sequence> <mx:Fade
target="{vb1}" alphaFrom="1" alphaTo="0" /> <mx:RemoveChildAction
target="{vb1}" /> <mx:AddChildAction
target="{vb2}" /> <mx:Fade
target="{vb2}" alphaFrom="0" alphaTo="1" /> </mx:Sequence> </mx:Transition> </mx:transitions> <mx:Button
label=" <mx:VBox
id="vb1" top="44" bottom="10"
right="10" left="10" backgroundColor="0xFFFFFF"
borderStyle="solid"> </mx:VBox> <mx:VBox
id="vb2" top="44" bottom="10"
right="10" left="10" backgroundColor="0x333333"
borderStyle="solid"> </mx:VBox> </mx:Application> From: I'm not finding any documented examples and something
like this -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe __,_._,___ |
- [flexcoders] Can a Transition be used for addedEffect / remo... Bruce Denham
- RE: [flexcoders] Can a Transition be used for addedEffe... Dustin Mercer