怎么去掉Flex4生成的SWF加载时的进度条


  汗~AJAX感太强了 但我要一下子加载 坛子里说了
  方法1:
  
  flex/spark"  
  xmlns:mx="library://ns.adobe.com/flex/mx" usePreloader="false">
  方法二:
  重写Preload的进度条类
  package com.haso.flex4SH.component
  {
  import flash.display.Sprite;
  import flash.events.Event;
  import flash.events.ProgressEvent;
  import mx.events.FlexEvent;
  import mx.preloaders.DownloadProgressBar;
  public class pbarunsee extends DownloadProgressBar
  {
  public function pbarunsee()
  {
  super();
  }
  override public function set preloader( preloader:Sprite ):void    {
  preloader.addEventListener( ProgressEvent.PROGRESS , SWFDownloadProgress );         
  preloader.addEventListener( Event.COMPLETE , SWFDownloadComplete ); 
  preloader.addEventListener( FlexEvent.INIT_PROGRESS , FlexInitProgress ); 
  preloader.addEventListener( FlexEvent.INIT_COMPLETE , FlexInitComplete ); 
  }
  private function SWFDownloadProgress( event:ProgressEvent ):void { 
  this.visible=false;
  } 
  private function SWFDownloadComplete( event:Event ):void {this.visible=false;} 
  private function FlexInitProgress( event:Event ):void { 
  this.visible=false;
  } 
  private function FlexInitComplete( event:Event ):void    
  {             
  dispatchEvent(new Event(Event.COMPLETE)); 
  } 
  }
  }
  flex/spark" 
  xmlns:mx="library://ns.adobe.com/flex/mx" 
  minWidth="955" minHeight="600"  preloader="com.haso.flex4SH.component.pbarunsee">

你可能感兴趣的:(flex4)