Home  >  Article  >  php教程  >  Flex tips for loading GIF images

Flex tips for loading GIF images

高洛峰
高洛峰Original
2016-12-27 17:10:491178browse

1. Download the GIFPlayer package

2. The source code is as follows:

<?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>

For more flex tips on loading GIF images, please pay attention to the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn