Add resize effect to transition : Resize Effect « Effects « Flex






Add resize effect to transition

Add resize effect to transition
    

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:Script>
        
        import mx.effects.easing.Bounce;
      
    </mx:Script>
    <mx:states>
        <mx:State name="bookDetails" basedOn="">
            <mx:AddChild relativeTo="{bookForm}" position="lastChild" creationPolicy="all">
                <mx:FormItem id="isbn" label="new Label" />
            </mx:AddChild>
            <mx:SetProperty target="{title}" name="text" value="New Details" />
            <mx:RemoveChild target="{bookLink}" />
        </mx:State>
    </mx:states>
    <mx:transitions>
        <mx:Transition fromState="*" toState="*">
            <mx:Parallel targets="{[book, bookLink, title, isbn]}">
                <mx:Resize duration="5000" easingFunction="Bounce.easeOut" />
            </mx:Parallel>
        </mx:Transition>
    </mx:transitions>
    <mx:Panel title="XML Book" id="book" horizontalScrollPolicy="off" verticalScrollPolicy="off">
        <mx:Form id="bookForm">
            <mx:FormItem label="Label 1" fontWeight="bold" /> 
            <mx:FormItem label="Label 2" fontStyle="italic" />
        </mx:Form>
        <mx:ControlBar>
            <mx:LinkButton label="Click" id="bookLink" click="currentState = 'bookDetails' " />
            <mx:Spacer width="100%" id="spacer1" />
            <mx:Label text="Title" id="title" />
        </mx:ControlBar>
    </mx:Panel>
</mx:Application>

   
    
    
    
  








Related examples in the same category

1.Using Resize effect to enlarge an image on mouse-overUsing Resize effect to enlarge an image on mouse-over
2.Two Resize effects for a Button controlTwo Resize effects for a Button control
3.Define effect using ActionScript with ResizeDefine effect using ActionScript with Resize
4.Use ActionScript to set up resize effectUse ActionScript to set up resize effect
5.Use Resize effect when the user moves the mouse over itUse Resize effect when the user moves the mouse over it
6.Panel resize effectPanel resize effect
7.Use two Resize effects for a Button control.Use two Resize effects for a Button control.
8.Resize Easing Effect
9.Add a transition to use a Wipe effect and a Resize effect with an easing function to animate the transition from view state to view stateAdd a transition to use a Wipe effect and a Resize effect with an easing function to animate the transition from view state to view state
10.Resize Image EffectResize Image Effect
11.Reverse Resize EffectReverse Resize Effect
12.Apply a Resize effect to multiple Button controls by using data binding with the effect's targets propertyApply a Resize effect to multiple Button controls by using data binding with the effect's targets property
13.Resize effectsResize effects
14.Using the Resize effect on an Image controlUsing the Resize effect on an Image control
15.Resizing a button that starts small and grows biggerResizing a button that starts small and grows bigger
16.Increase width and height of a Button control by 15 pixels each time the user selects itIncrease width and height of a Button control by 15 pixels each time the user selects it
17.Resize Target by PropertiesResize Target by Properties