积少成多Flash(11) - Flex 3.0 动画效果(effect)
2009-11-28 00:00:00 来源:WEB开发网4、Resize.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 - Resize (重设大小)">
<mx:Script>
<![CDATA[
private function smoothImage(e:Event):void
{
var bmp:Bitmap = e.target.content as Bitmap;
bmp.smoothing = true;
}
]]>
</mx:Script>
<mx:Resize id="resizeUp" target="{image}" widthTo="180" heightTo="180" />
<mx:Resize id="resizeDown" target="{image}" widthTo="48" heightTo="48" />
<mx:Image id="image" source="@Embed('images/logo.png')"
x="24" y="24" width="48" height="48"
creationComplete="smoothImage(event)"
/>
<mx:ControlBar horizontalAlign="center">
<mx:Button label="放大" click="resizeUp.end(); resizeUp.play();" />
<mx:Button label="缩小" click="resizeDown.end(); resizeDown.play();" />
</mx:ControlBar>
</mx:Panel>
- ››FLASH不等于运算符!=的使用实例
- ››FLASH不全等运算符!==
- ››FLASH字符串分隔符运算符
- ››FLASH% 模运算符
- ››Flash+、++、+= 加法运算符
- ››Flash, 逗号运算符
- ››flash中的-、--、-=减法运算符
- ››Flash的-Infinity 常数、.点运算符、/ 除法运算符...
- ››Flash两种注释方法/*..*/ 和// 注释行分隔符运算符...
- ››Flash的/=除法赋值运算符、=赋值运算符、== 等于运...
- ››Flash之?: 条件运算符、^ 按位 XOR 运算符、^= 按...
- ››Flash的_framesloaded代码示例
更多精彩
赞助商链接