Dispatch effectStart event and effectEnd event once per target
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
import mx.effects.*;
import mx.events.EffectEvent;
import mx.core.UIComponent;
private function endSlowFadeEffectListener(eventObj:EffectEvent):void
{
var effectObj:Effect = Effect(eventObj.target);
var effectTarget:UIComponent =UIComponent(eventObj.effectInstance.target);
}
</mx:Script>
<mx:Fade id="slowFade" duration="2000" effectEnd="endSlowFadeEffectListener(event);" />
<mx:Button id="myButton1" creationCompleteEffect="{slowFade}" />
</mx:Application>
Related examples in the same category