flex gifloader
×î½üÏîÄ¿ÐèÒªÔËÓõ½FLEX£¬µ«GOOGLEһϷ¢ÏÖ¿ÉÓõÄ×ÊÁÏʵÔÚÌ«ÉÙÁË¡£
ÕÒÁ˺þ÷¢ÏÖgoogle codeÉÏÔÚÕâ¸ö»¹²»´í£¬»¹ÓкܶණÎ÷¿ÉÒԺúÃÑо¿Ñо¿
http://code.google.com/p/as3gif/
ÏÂÃæµÄÀý×ÓÊǽ«¶¯Ì¬GIF°ó¶¨µ½SPRITEÉÏ
package com.render
{
import flash.display.Sprite;
import flash.events.IOErrorEvent;
import flash.net.URLRequest;
import mx.core.Application;
import org.bytearray.gif.player.GIFPlayer;
public class SpriteWithBitmap extends Sprite
{
//Pass the source path or url here.
private static const defaultUrl:String = "/consoleweb/console/images/treewait.gif";
public function SpriteWithBitmap(url:String = defaultUrl)
{
loadImg(url);
}
private function loadImg(url:String):void
{
var gifPlayer:GIFPlayer = new GIFPlayer();
var request:URLRequest = new URLRequest(url);
gifPlayer.load(request);
gifPlayer.addEventListener(IOErrorEvent.IO_ERROR,loadFailure);
this.addChild(gifPlayer);
//ÉèÖÃͼƬ¾ÓÖÐÏÔʾ
gifPlayer.x = Application.application.checkTree.width * 0.5 - 32;
gifPlayer.y = Application.application.checkTree.height * 0.5 -32;
}
private function loadFailure(event:IOErrorEvent):void
{
}
}
}
µ«Òª¶¯Ì¬È¡µ½GIFµÄ¿í¶È»¹ÊÇûÓÐÍ·Ð÷£¬ÔÚÍøÉÏ¿´µ½¹ýÕâ¸ö
Hi, Thibault Imbert. The width/height property return 0, event after COMPLETE event dispatch. The GIFPlayerEvent has the ‘rect’, but it’s useless.
I’ve edited your GIFPlayer class (you should have done that).
All u needed 2 do is just to create a public var
public var rect:Rectangle;
And after in the readStream method to do so:
rect = aFrames[0].bitma
Ïà¹ØÎĵµ£º
ÏÖÔÚµÄFlexÓ¦Ó㬴ó¶àÊÇһЩ¶àýÌå½»»¥Ê½µÄWebÒ³Ã棬µÍ²ã´ÎµÄÓ¦ÓûòÕßÊÇһЩÖ÷ÒªÓ¦ÓõIJ¹³ä¡£FlexÓ¦Óû¹Ô̺¬×ž޴óµÄDZÁ¦¡£Ò»¶¨»á³öÏÖÇ¿
׳µÄ¾ßÓи߸ºÔØÄÜÁ¦µÄ²¢·¢Ó¦Óá£ÒÔFlex¼¼Êõ¸ÄдÍøÕ¾µÄ¼Ü¹¹£¬Ìṩ¸üÓÑÉÆÓ뻥¶¯µÄ²Ù×÷½éÃ棬¸ÕºÃ½â¾öÁËERPϵͳÓиİæµÄÐèÇ󣬿ÉÒÔ³¢ÊÔÒÔFlex¼¼Êõ¿ª·¢
ERPϵͳ¡£
¡¡¡¡¶ÔÓÚÒ»¸ö¹«Ë¾ÏëÒÔF ......
Flex Builder 3.0 For Eclipse plugin×¼±¸°²×°.
2009-11-11 15:38
ÕâÁ½Ìì×¼±¸Ñ§Ï°Flex,ÓÚÊÇÏÂÔØÁËFlex Builder 3.0 For Eclipse plugin×¼±¸°²×°.
µ«ÊÇ°²×°ºóÆô¶¯Eclipse,ÕÒÁË°ëÌìҲûÕÒµ½Flex.¶øÇÒFlex Builder»á°ÑJREÒ²°²×°.¾õµÃÕâÑùºÜ²»Ë¬.
ËùÒÔÎÒÏëµ½Äܲ»ÄÜÀ´¸öFlex BuilderÂÌÉ«°²×°·½·¨ÄØ.
Ïëµ½¾Í×ö.ÏÂÃæÊÇÎÒµÄ ......
Windows
ÉèÖû·Path¾³±äÁ¿,¼ÓÈëflexµÄSDkµÄbinĿ¼·¾¶£¬È磺f:\flex_sdk_3\bin¡£ÉèÖúÃÁËÖ®ºó£¬´ò¿ªÃüÁîÐУ¬¶¨Î»µ½ÏîĿĿ¼£¬ÊäÈëÈçÏÂÃüÁmxmlc ÏîÄ¿Ãû.mxml¡£Èç¹û´Ëʱ³öÏÖÁË“Error:could not find JVM”£¬ÕâʱÐèÒªÊÖ¶¯Ö¸¶¨JRE·¾¶£¬´ò¿ªFlex3 SDKµÄbinĿ¼£¬ÓÃÎı¾±à¼Æ÷´ò¿ªjvm. ......
amf3,adobe´´Á¢µÄÊý¾Ý¸ñʽÓÉÓÚʹÓöþ½øÖÆ,ûÓÐÁËxmlµÈÈßÓàµÄ×Ö·ûÊý¾ÝÁ¿»áÉٺܶà!¶øÇҺܶà²âÊÔ±¨¸æ¾ù²â³öamf´«µÝЧ¹ûºÜ¸ß.
Õâ´ÎÊÇʹÓÃFlexµÄSocketÀàÓëjavaµÄ·þÎñ¶Ë½øÐÐͨÐÅ,
²½ÖèÊÇ:
¿Í»§¶ËÓÃsocketÀàÁ¬½Ójava·þÎñÆ÷,
ʹÓòéѯ×Ö·û´®½øÐÐÇëÇó,
java½«Êý¾Ý·âװΪhashmap,×îºó½«hashmapÓÃamfoutputstreamÊä³öÖÁflexµÄ¿Í» ......
ÕâÊÇÒ»¸ö¼òµ¥µÄ¹¤×÷Á÷Éè¼ÆÆ÷Ä£ÐÍ£¬»¹²»ÄÜÓÃÓÚʵ¼ÊÏîÄ¿£¬Ö»ÊǸöÈËÐËȤ×öһЩ¼¼ÊõѧϰÓë³¢ÊÔ¡£Éè¼ÆÆ÷Ö§³ÖһЩ¹¤×÷Á÷»ù±¾×é¼þµÄ»æÖÆ£¬Èç½Úµã¡¢Â·ÓÉÏß·µÈµÈ¡£
Õû¸öÉè¼ÆÆ÷ÊÇ´¿Flex¼¼ÊõʵÏÖ£¬Î´ÓëÊý¾Ý¿â½Ó¿Ú¡£²ÉÓÃFlex Builder 3.0¿ª·¢£¬Í¨¹ýʵ¼ù¶ÔFlexÒÔϼ¼ÊõÓÐÁ˸ü½øÒ» ......