flex 图片翻转放大缩小特效

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
	
	
		<mx:Script>
		<![CDATA[

                public function doZoom(event:MouseEvent):void {
                if (zoomAll.isPlaying) {
                    zoomAll.reverse();
                }
                else {
                    // If this is a ROLL_OUT event, play the effect backwards.
                    // If this is a ROLL_OVER event, play the effect forwards.
                    zoomAll.play([event.target], event.type == MouseEvent.ROLL_OUT ? true : false);
                }
            }
		]]>
	</mx:Script>
	 <mx:Rotate id="rotate" angleFrom="0.0" angleTo="-1080"              target="{img}"/>
	 <mx:Zoom id="zoomAll" zoomWidthTo="2" zoomHeightTo="2" zoomWidthFrom="1" zoomHeightFrom="1"  />
	<mx:Image x="288" y="200" source="@Embed(source='No.png')"  id="img"
                scaleX="1" scaleY="1"
                rollOver="doZoom(event)" click="rotate.end();rotate.play()"
                rollOut="doZoom(event)" width="32" height="33"/>
		

	 
</mx:Application>
posted @ 2013-02-20 17:47  zxh1141  阅读(2748)  评论(0编辑  收藏  举报