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

flex¼ÓÔØÍⲿswfÎļþ£¬²¢ÇÒ»¥ÏàͨѶ

´ÓÍøÉÏתÔصģ¬»¹Ã»Ê±¼ä¼ø¶¨£¬ÔݼǼÔÚÕâÀï
http://blog.csdn.net/zyjasp/archive/2008/05/16/2452175.aspx
µÚÒ»²½:½¨Á¢¼ÓÔØÀà[CtmObjLoader],´ËÀà¿ÉÒÔ¼ÓÔØÎļþÀàÐÍ [ͼƬÎļþ»òswfÎļþ]
package
{
import flash.display.DisplayObject;
import flash.display.Loader;
import flash.events.*;
import flash.net.URLRequest;
import mx.core.UIComponent;
public class CtmObjLoader extends UIComponent
{
  private var ProgressHandle:Function=null;
  public var loader:Loader;
  public var _bLoaded:Boolean=false;
  public var _bShow:Boolean=true;
  //@UrlRequest  ¼ÓÔصĵØÖ·
  //@progressHandle ¼ÓÔØÖеĴ¦Àí¹ý³Ì
  //bShow  ¼ÓÔغóÊÇ·ñÏÔʾ³öÀ´ 
  public function CtmObjLoader(UrlRequest:String=null,progressHandle:Function=null,bShow:Boolean=true)
  {
   super();
   if(UrlRequest)LoadThis(UrlRequest,progressHandle,bShow);
  }
  public function LoadThis(UrlRequest:String,progressHandle:Function=null,bShow:Boolean=true):void{
   RemoveChild();
            loader = new Loader();
            _bShow=bShow;
            ProgressHandle=progressHandle;
            configureListeners(loader.contentLoaderInfo);
            if(_bShow)addChild(loader);//Èç¹ûÐèÒªÏÔʾ£¬Ôòaddchild
            var request:URLRequest = new URLRequest(UrlRequest);
            loader.load(request);   
  }
  public function UnLoadThis():void{
   try{
    RemoveChild();
    this.parent.removeChild(this);
   }catch(e:Err


Ïà¹ØÎĵµ£º

Flex ApplicationÀïµÄaddChild()

ת×Ô:http://www.cnblogs.com/jiahuafu/archive/2009/03/20/1417679.html
ÔÚFlex ApplicationÀÊDz»ÄÜÖ±½ÓÓÃaddChildÌí¼ÓSprite£¬MovieClipµÈÀ´×Ôflash.display°üÀïµÄÀàµÄ¡£Æ©ÈçÒÔÏ´úÂë¾Í»á±¨´í£º
private function init():void
{
var sp:Sprite = new Sprite();
addChild(sp);
}
TypeEr ......

flex builder eclipse²å¼þ°²×°·½·¨

Flex for eclipse²å¼þ£¬¹ËÃû˼Ò壬¾ÍÊÇ¿ÉÒÔÔÚEclipseϽøÐÐFlex¿ª·¢µÄ²å¼þ¡£ÏÂÃæ½éÉÜÕâ¸ö²å¼þµÄ°²×°·½·¨¡£
°²×°Flex for eclipse²å¼þ£¬ºÍ°²×°EclipseÆäËüµÄ²å¼þ·½·¨¶¼ÊÇÒ»ÑùµÄÓÐÁ½ÖÖ·½Ê½£ºÒ»ÊÇÖ±½Ó½«features,pluginsÁ½¸öÎļþ¼ÐÓëEclipseµÄºÏ²¢£»ÁíÒ»ÖÖÊÇͨ¹ýlinkµÄ·½Ê½£¬ÏÂÎÄÊǽéÉÜÈçºÎͨ¹ýLinkµÄ·½Ê½°²×°£®
1,ͨ¹ýlink· ......

¸øFlexµÄPopUpManagerÏÔʾ¿Ø¼þÌí¼ÓÌØЧ

PopUpEffect.as
package
{
import flash.display.DisplayObject;

import mx.core.IFlexDisplayObject;
import mx.effects.Blur;
import mx.events.TweenEvent;
import mx.managers.PopUpManager;

public class PopUpEffect
{

public function PopUpE ......

Àí½â Flex itemRenderer µÚ 3 ²¿·Ö: ͨÐÅ

Ô­ÎĵØÖ·£ºhttp://www.adobe.com/cn/devnet/flex/articles/itemrenderers_pt3.html
ÔÚ±¾ÏµÁÐµÄµÚ 2 ²¿·ÖÖÐ, ÎÒÏòÄúչʾÁËÈçºÎʹÓà MXML ºÍ ActionScript ´´½¨Íⲿ itemRenderer¡£ÔÚÎÒÓùýµÄʾÀýÖÐ, ÓÐÒ»¸öµ÷¶È×Ô¶¨Ê¼þ BuyBookEvent µÄ Button£­ÕâÑùÓ¦ÓóÌÐò¿ÉÒÔ¶ÔËü×÷³öÏìÓ¦¡£±¾ÎĽøÒ»²½ÌÖÂÛÓë itemRenderer µÄͨÐÅ¡£
ÎÒ ......

flex ×Ô¶¨Òå½ø¶ÈÌõ

µÚÒ»ÖÖ£ºÐÞ¸ÄÏÂÔؽø¶ÈµÄÎÄ×ÖΪÖÐÎÄ
½¨Á¢À©Õ¹ÖÁ mx.preloaders.DownloadProgressBar µÄÒ»¸öÀࣺ
01.package myDownPro
02.{
03.import mx.preloaders.DownloadProgressBar;
04.
05.public class myDownProBar extends DownloadProgressBar
06.{
07. public function myDownProBar()
08. {
09. //TODO: impl ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ