内容简介:这篇文章主要是flex使用GIFPlayer加载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>
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Python Data Structures and Algorithms
Benjamin Baka / Packt Publishing / 2017-5-30 / USD 44.99
Key Features A step by step guide, which will provide you with a thorough discussion on the analysis and design of fundamental Python data structures.Get a better understanding of advanced Python c......一起来看看 《Python Data Structures and Algorithms》 这本书的介绍吧!