Wrap Parallel, fade and move with Transition : Transition « Effects « Flex






Wrap Parallel, fade and move with Transition

Wrap Parallel, fade and move with Transition
  
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
    <mx:states>
        <mx:State name="Charge">
            <mx:AddChild relativeTo="{form1}" position="lastChild">
                <mx:FormItem label="Charge Number" id="formitem1">
                    <mx:TextInput/>
                </mx:FormItem>
            </mx:AddChild>

        </mx:State>
        <mx:State name="Check">
            <mx:AddChild relativeTo="{form1}" position="lastChild">
                <mx:FormItem label="Routing Number" id="formitema">
                    <mx:TextInput/>
                </mx:FormItem>
            </mx:AddChild>

        </mx:State>
    </mx:states>
    <mx:transitions>
        <mx:Transition id="paymentTransitionCharge" fromState="*" toState="Charge">
            <mx:Parallel targets="{[formitem1,formitema]}">
            <mx:Fade duration="400"/>
            <mx:Move xFrom="0" yFrom="0" duration="400"/>
        </mx:Parallel>
        </mx:Transition>
            <mx:Transition id="paymentTransitionCheck" fromState="*" toState="Check">
                <mx:Parallel targets="{[formitema,formitem1]}">
                <mx:Fade duration="400"/>
                <mx:Move xFrom="0" yFrom="0" duration="400"/>
                </mx:Parallel>
        </mx:Transition>
    </mx:transitions>
    <mx:Form x="103" y="56" width="397" height="284" id="form1">
        <mx:RadioButtonGroup id="radiogroup1"/>
        <mx:RadioButton x="143" y="70" label="Check" groupName="radiogroup1" click="currentState='Check'"/>
        <mx:RadioButton x="143" y="94" label="Charge" groupName="radiogroup1" click="currentState='Charge'"/>
    </mx:Form>
</mx:Application>

   
    
  








Related examples in the same category

1.Use Transition to add and remove controls dynamicallyUse Transition to add and remove controls dynamically
2.Define transitions for this example in MXML using the tagDefine transitions for this example in MXML using the <mx:transitions> tag
3.Set control to invisible during transitionSet control to invisible during transition
4.Using a filter in TransitionUsing a filter in Transition
5.Advanced Transitions: Move, Rotate, ResizeAdvanced Transitions: Move, Rotate, Resize
6.Transitions with tagTransitions with <s:transitions> tag
7.Transition With BlursTransition With Blurs
8.Action TransitionsAction Transitions
9.Custom AnimateTransitionShader TransformCustom AnimateTransitionShader Transform
10.Using a filterUsing a filter
11.Defining a custom filterDefining a custom filter
12.Change button position and fade buttonChange button position and fade button