[转帖]Flex 构造闪动的控件
本来是为了让ArcGIS的GraphicsLayer闪动的,但是我觉得这是Flex通用的方法,有兴趣的可以试验一下,毕竟这段代码核心部分不是ArcGIS的API.
<mx:Glow id="glowGraphic" duration="800" alphaFrom="1.0" alphaTo="0.1" blurXFrom="0.0" blurXTo="25.0" blurYFrom="0.0" blurYTo="25.0" color="0x00ff00"/> <esri:GraphicsLayer id="graphicsLayer" creationCompleteEffect="{glowGraphic}" effectEnd="onEffEnd(event)"/> import mx.events.EffectEvent;public function onEffEnd(e:EffectEvent):void{ e.effectInstance.reverse(); e.effectInstance.play();}