李石磊 学习日记

一、下载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图片的更多相关文章

  1. Unity3d载入外部图片文件

    unity里的图片在生成时会压缩成资源文件,有时客户想自己放一些图片用unity显示,就必须载入外部图片. 大体思路:用Application.streamingAssetsPath或Applicat ...

  2. UWP应用载入SVG图片的兼容性方案

    原文 UWP应用载入SVG图片的兼容性方案 新版本<纸书科学计算器>的更新点之一,就是优化了表达式的显示方式.在旧版本中,表达式里的符号是用png图片显示的,当用户放大看的时候会发现一些锯 ...

  3. ios启动载入启动图片

    版本判断: 1.首先你要知道这个键值对的key:id key =   (id)kCFBundleVersionKey; 2.同过本地的NSBundle取得当前的版本号. 3.在沙盒中取得对应的版本号. ...

  4. StaggeredGridView+universal-image-loader载入网路图片实现瀑布流

    StaggeredGridView 开源lib  https://github.com/maurycyw/StaggeredGridView 文章demo下载地址  http://download.c ...

  5. MFC载入JPG图片

    ## 1.定义画图函数 HRESULT CIPCamDlg::draw(char *lpImageFile, HWND hWnd, int nScrWidth, int nScrHeight) { H ...

  6. 14)载入png图片

    1)之前在窗口中载入图片  一般都是bmp的  但是  我想从网上下一些图片,这些图片可能是png的 2)那么就有了下面的操作 3)png图片可以直接做成透明的. 4)首先是创建窗口的基本代码: #i ...

  7. flex acionscript png图片去除多余空白,生成合适大小图片

    //最小矩形(非透明最小区域) public static function getMinRect(target:BitmapData):Rectangle{   return target.getC ...

  8. 在html页面中利用ftp访问协议格式载入服务器图片

    访问格式为:ftp://用户名:密码@服务器ip:服务器端口/具体文件路径 如下所示: <img src="ftp://lxj:123@127.0.0.1:21/IMG_2013051 ...

  9. cocos2d js 怎样动态载入外部图片

    官网没有详细样例,仅仅有看api,研究成果例如以下 var that = this; var url = "http://xxxxxx"; cc.loader.loadImg(ur ...

随机推荐

  1. windows多线程没那么难

    windows多线程没那么难 作者:vpoet mail:vpoet_sir@163.com 上一博文中我们引入了CreateThread()多线程编程一个简单的例子,事实上我说windows 多线程 ...

  2. 怎么查看chrome网络日志

    最近在分析一个页面访问慢的问题,在分析的除了wireshark抓包等手段外,还用到了chrome的日志辅助分析 使用 chrome://net-internals/#events 可以打开日志追踪窗口 ...

  3. Unity 生命周期

    原文翻译:            Execution Order of Event Functions            事件函数的执行顺序                        Edit ...

  4. 使用Comparable接口的小例子

    代码: public class Student implements Comparable<Student> { private int id; private String name; ...

  5. linux C连接mysql

    linux 环境下C语言连接数据库首先要配置环境 1,确定你的linux下安装mysql我们可以做个测试. 打开你的终端,在终端下输入:service mysqld status [root@bogo ...

  6. winform —— listview创建表及简单的增删改查

    using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...

  7. UIPickerView(选择控制器) 自学之初体验

    UIPickerView 是一个选择器控件, 它可以生成单列的选择器,也可生成多列的选择器,而且开发者完全可以自定义选择项的外观,因此用法非常灵活.UIPickerView 直接继承了 UIView  ...

  8. BestCoder 2nd Anniversary 1002 Arrange

    排除所有不符合条件后根据当前位置上下界计算, 由于前面取的数肯定在之后的区间内,所以去掉已取的个数即可. #include <iostream> #include <cstdio&g ...

  9. poj 01背包

    首先我是按这篇文章来确定题目的. poj3624 Charm Bracelet 模板题 没有要求填满,所以初始化为0就行 #include<cstdio> #include<algo ...

  10. golang illegal base64 data at input byte

    //one reason is whitespace ciphertext = strings.Replace(ciphertext, " ", "", -1) ...