flex 加载GIF图片
发布时间:2020-12-15 03:43:03 所属栏目:百科 来源:网络整理
导读:李石磊 学习日记 一、下载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" minW
李石磊 学习日记 一、下载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>(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |