Use Fade class to add effect to panel : Fade Effect « Effects « Flex






Use Fade class to add effect to panel

Use Fade class to add effect to panel
     
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="createEffect(event);">
    <mx:Script>
        
        import mx.effects.Fade;
        import flash.events.Event;
        private var myFade:Fade = new Fade();

        private function createEffect(eventObj:Event):void {
            myFade.duration=5000;
            myFade.play([myPanel1, myPanel2]);
        }
        private function playZoom(eventObj:Event):void {
            myZoom.end();
            myZoom.target = myTA;
            myZoom.play();
        }
      
    </mx:Script>
    <mx:Zoom id="myZoom" duration="2000" zoomHeightFrom="0.10"
        zoomWidthFrom="0.10" zoomHeightTo="1.00" zoomWidthTo="1.00" />
    <mx:Panel id="myPanel1">
        <mx:TextArea id="myTA" />
    </mx:Panel>
    <mx:Panel id="myPanel2">
        <mx:Button id="myButton" click="playZoom(event);" />
    </mx:Panel>
</mx:Application>

   
    
    
    
    
  








Related examples in the same category

1.Using the AnimateProperty effect to fade a buttonUsing the AnimateProperty effect to fade a button
2.Using the Fade effect on the buttonUsing the Fade effect on the button
3.A fade effectA fade effect
4.Apply the Fade effect to the Label control using the system font
5.Fade effectEnd eventFade effectEnd event
6.Fade effect for ButtonFade effect for Button
7.Combine Fade and Move effect into SequenceCombine Fade and Move effect into Sequence
8.Combine Fade, Pause and Move effect into SequenceCombine Fade, Pause and Move effect into Sequence
9.Add Fade and Move effect into ParallelAdd Fade and Move effect into Parallel
10.Tooltip Fade effectTooltip Fade effect
11.Fade Effects for adding item to TileFade Effects for adding item to Tile
12.Fade Button creationCompleteEffectFade Button creationCompleteEffect
13.Fly fade effectFly fade effect
14.Using Fade effect so that ToolTips fade in when the user moves the mouse pointer over a component with a ToolTipUsing Fade effect so that ToolTips fade in when the user moves the mouse pointer over a component with a ToolTip
15.Fade PropertiesFade Properties
16.Fade properties: alphaFrom, alphaTo, duration
17.Fade DurationFade Duration