<!--鼠标放到地图上的自定义小图标时动作效果start--> <s:Move id="move1" xBy="-319" duration="300"/> <s:Move3D id="moveEffect" duration="200" repeatBehavior="reverse" repeatCount="2000"/> <!--鼠标放到地图上的自定义小图标时动作效果over-->
graphic.addEventListener(MouseEvent.CLICK,showSYDSymbolInfo); graphic.addEventListener(MouseEvent.ROLL_OVER,refMove); graphic.addEventListener(MouseEvent.ROLL_OUT,refMoveEnd);
private function refMove(event:MouseEvent):void{ var g:Graphic = event.currentTarget as Graphic; moveEffect.yFrom=g.y; moveEffect.yTo=g.y-8; moveEffect.target=g; moveEffect.play(); } private function refMoveEnd(event:MouseEvent):void{ moveEffect.stop(); moveEffect.reverse(); }