脚本宝典收集整理的这篇文章主要介绍了flex小技巧之加载GIF图片,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
一、下载GIFplayer包
二、源码如下:
<?XMl version="1.0" encoding="utf-8"?> <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" minWidth="955" minHeight="600"> <fx:Script> <![CDATA[ import org.bytearray.gif.player.GIFPlayer; PRivate VAR gifPlay:GIFPlayer=new GIFPlayer(); private var gifPlay2:GIFPlayer=new GIFPlayer(); private function inIT():void{ var req:URLRequest=new URLRequest("emergency/emergencyimg/mark.gif"); gifPlay.load(req); gifImg.addChild(gifPlay); } ]]> </fx:Script> <fx:Declarations> <!-- 将非可视元素(例如服务、值对象)放在此处 --> </fx:Declarations> <mx:TitleWindow title="abc" id="ADwindow" width="400" height="283" > <mx:Image id="gifImg" width="221" height="92" creationcomplete="init()"/> </mx:TitleWindow> </s:Application>
以上是脚本宝典为你收集整理的flex小技巧之加载GIF图片全部内容,希望文章能够帮你解决flex小技巧之加载GIF图片所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。