Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

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µÄsocketÓëjavaʹÓÃamf3½øÐÐͨÐÅ

amf3,adobe´´Á¢µÄÊý¾Ý¸ñʽÓÉÓÚʹÓöþ½øÖÆ,ûÓÐÁËxmlµÈÈßÓàµÄ×Ö·ûÊý¾ÝÁ¿»áÉٺܶà!¶øÇҺܶà²âÊÔ±¨¸æ¾ù²â³öamf´«µÝЧ¹ûºÜ¸ß.
Õâ´ÎÊÇʹÓÃFlexµÄSocketÀàÓëjavaµÄ·þÎñ¶Ë½øÐÐͨÐÅ,
²½ÖèÊÇ:
¿Í»§¶ËÓÃsocketÀàÁ¬½Ójava·þÎñÆ÷,
ʹÓòéѯ×Ö·û´®½øÐÐÇëÇó,
java½«Êý¾Ý·âװΪhashmap,×îºó½«hashmapÓÃamfoutputstreamÊä³öÖÁflexµÄ¿Í» ......

¸öÈË×ܽáflex¸÷ÖÖÓ÷¨

//»ñµÃÆÁÄ»µÄ·Ö±æÂÊ
var
 x:Number=Capabilities.screenResolutionX;
var
 y:Number=Capabilities.screenResolutionY;
Alert.show(
"x="
+x+
"y="
+y);
µÚ¶þÖÖ·½·¨
Alert.show(stage.fullScreenWidth+
"=="
+stage.fullScreenHeight);
 
//»ñµÃstage£¨¹¤×÷Çø£ ......

flex°ÙÒ¶´°Ð§¹û

effects\Blinds.as
JScript code
package effects
{
   
    import effects.effectClasses.BlindsInstance;
   
    import mx.controls.scrollClasses.ScrollBarDirection;
    import mx.effects.IEffectInstance;
   ......

·¢²¼Flex¹¤×÷Á÷Éè¼ÆÆ÷Ä£ÐÍV1.0.0 Ô´Âë

      ÕâÊÇÒ»¸ö¼òµ¥µÄ¹¤×÷Á÷Éè¼ÆÆ÷Ä£ÐÍ£¬»¹²»ÄÜÓÃÓÚʵ¼ÊÏîÄ¿£¬Ö»ÊǸöÈËÐËȤ×öһЩ¼¼ÊõѧϰÓë³¢ÊÔ¡£Éè¼ÆÆ÷Ö§³ÖһЩ¹¤×÷Á÷»ù±¾×é¼þµÄ»æÖÆ£¬Èç½Úµã¡¢Â·ÓÉÏß·µÈµÈ¡£
      Õû¸öÉè¼ÆÆ÷ÊÇ´¿Flex¼¼ÊõʵÏÖ£¬Î´ÓëÊý¾Ý¿â½Ó¿Ú¡£²ÉÓÃFlex Builder 3.0¿ª·¢£¬Í¨¹ýʵ¼ù¶ÔFlexÒÔϼ¼ÊõÓÐÁ˸ü½øÒ» ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ