首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 媒体动画 > flex >

Flex 奇效机制

2013-08-16 
Flex 特效机制下面展示Effect的继承类图?*参考资料:http://developer.51cto.com/art/201008/216791.htm?Mx

Flex 特效机制

下面展示Effect的继承类图

Flex 奇效机制

?

*参考资料:http://developer.51cto.com/art/201008/216791.htm

?Mxml 和AS 代码设置特效

<?xml version="1.0"?><s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"   xmlns:s="library://ns.adobe.com/flex/spark"   xmlns:mx="library://ns.adobe.com/flex/mx"   initialize="application1_initializeHandler(event)"><fx:Script><![CDATA[import mx.effects.WipeUp;import mx.events.FlexEvent;private var wipedown:WipeDown;private var wipein:WipeUp;protected function application1_initializeHandler(event:FlexEvent):void{wipedown = new WipeDown();wipedown.duration = 1000;wipein = new WipeUp();wipein.duration = 1000;wipein.target = testImg;testImg.setStyle("showEffect", wipedown);testImg.setStyle("hideEffect", wipein);}]]></fx:Script><fx:Declarations><mx:WipeDown id="wipeOut" duration="1000"/><mx:WipeDown id="wipeIn" duration="1000" /></fx:Declarations><s:Panel title="WipeDown Effect Example" width="95%" height="95%" ><s:VGroup left="20" right="20" top="20" bottom="20"><s:HGroup><mx:Image source="@Embed(source='resource/1.jpg')"  visible="{cb1.selected}"  hideEffect="{wipeOut}" showEffect="{wipeIn}"/><mx:Image source="@Embed(source='resource/1.jpg')"  id="testImg"  visible="{cb1.selected}"/></s:HGroup><s:CheckBox id="cb1" label="visible" selected="true" /></s:VGroup></s:Panel></s:Application>

?

热点排行