WEB开发网
开发学院图形图像Flash 积少成多Flash(11) - Flex 3.0 动画效果(effect) 阅读

积少成多Flash(11) - Flex 3.0 动画效果(effect)

 2009-11-28 00:00:00 来源:WEB开发网   
核心提示: 3、Rotate.mxml<?xmlversion="1.0"encoding="utf-8"?><!--演示旋转的动画效果--><mx:Panelxmlns:mx="http://www.adobe.com/200

3、Rotate.mxml

<?xml version="1.0" encoding="utf-8"?>
<!--
    演示 旋转 的动画效果
-->
<mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="400" height="300"
    title="Effect - Rotate (旋转)">
    
    <mx:Script>
        <![CDATA[
        
            [Bindable]
            private var angle:int = 0;
            
            private function rotateImage():void
            {
                rotate.end();
                angle +=45;
                rotate.play();
            }
            
        ]]>
    </mx:Script>
    
    <mx:Rotate id="rotate" angleFrom="{angle-45}" angleTo="{angle}" target="{image}" duration="100" />
    
    <mx:Image id="image" source="@Embed('images/logo.png')" 
        x="24" y="24" width="48" height="48"
     />
     
     <mx:ControlBar horizontalAlign="center">
         <mx:Button label="旋转 45 度" click="rotateImage();" />
     </mx:ControlBar>
     
</mx:Panel>

上一页  1 2 3 4 5 6 7 8  下一页

Tags:积少成多 Flash Flex

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接