动态效果
触发器名称 对应事件名称 事件描述
addedEffect added 当组件被添加到容器时触发
createCompleteEffect createComplete 当组件完成绘制时触发
focusInEffect focusIn 当组件获得光标焦点时触发
focusOutEffect focusOut 当组件失去光标焦点时触发
hideEffect hide 当组件变成不可见时触发
showEffect show 当组件变成可见时触发
mouseDownEffect mouseDown 当鼠标在组件上按下时触发
mouseUpEffect mouseUp 当鼠标在组件上松开时触发
rollOverEffect rollOver 当鼠标移动到组件上时触发
moveEffect move 当组件被移动时触发
resizeEffect resize 当组件改变大小时触发
Effect中
引用
mx:AnimateProperty可实现拉伸效果 mx:Blur模糊效果 mx:Dissolve实现淡出淡入效果,与mx:Fade相似 mx:Glow外发光效果 mx:Iris以矩形方式出现或消失 mx:Move移动效果 mx:Parallel多种效果叠加 mx:Pause停止 mx.effects.easing.Bounce.easeOut可产生弹动效果 mx:Resize改变大小 mx:Rotate旋转角度 mx:SoundEffect声音效果 mx:WipeDown从上往下消失或出现 mx:WipeLeft从右往左消失或出现 mx:WipeRight从左往右消失或出现 mx:WipeUp从下往上消失或出现 mx:Zoom放大或缩小 </mx:Transition>不同state切换时的过渡效果
Charts(统计) mx:AreaChart是一种以面积作为表示方式 mx:AxisRenderer是一种轴图,股票交易常以这种方式表示 mx:BarChart是柱状图 mx:BubbleChart气泡图 mx:CandlestickChart一种比较有趣的图,”涨”跟”跌”的颜色会不一样 mx:CategoryAxis跟AxisRenderer很像 mx:ColumnChart跟mx:BarChart很像 mx:DateTimeAxis以日期为轴的折线图 mx:GridLines多条线图 mx:HLOCChart跟AxisRenderer很像 mx:Legend图例,离散的点 mx:LinearAxisAxis系列 mx:LineChart折线图 mx:LogAxisAxis系列 mx:PieChart饼图 mx:PlotChart跟Legend很像
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
<mx:Script>
<![cdata[
]]>
</mx:Script>
<mx:Glow id="glowImage" duration="1000"
alphaFrom="1.0" alphaTo="0.3"
blurXFrom="0.0" blurXTo="50.0"
blurYFrom="0.0" blurYTo="50.0"
color="0x00FF00"/>
<mx:Glow id="unglowImage" duration="1000"
alphaFrom="0.3" alphaTo="1.0"
blurXFrom="50.0" blurXTo="0.0"
blurYFrom="50.0" blurYTo="0.0"
color="0x0000FF"/>
<mx:Panel title="Glow Effect Example" width="75%" height="75%"
paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">
<mx:Text width="100%" color="blue"
text="Click and hold the mouse on the image to see glowImage effect. Release the mouse to see unglowImage effect."/>
<mx:Image source="@Embed(source='1.jpg')"
mouseDownEffect="{glowImage}"
mouseUpEffect="{unglowImage}"/>
</mx:Panel>
<mx:Iris id="irisOut" duration="1000" showTarget="true"/>
<mx:Iris id="irisIn" duration="1000" showTarget="false"/>
<mx:Panel title="Iris Effect Example" width="75%" height="75%"
paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">
<mx:Text width="100%" color="blue"
text="Use the Iris effect to show or hide the phone image."/>
<mx:Image id="flex" source="@Embed(source='1.jpg')"
visible="{cb1.selected}"
showEffect="{irisIn}" hideEffect="{irisOut}"/>
<mx:CheckBox id="cb1" label="visible" selected="true"/>
</mx:Panel>
</mx:Application>