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