方法1:
xmlns:s="library://ns.adobe.com/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));
}
}
}
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
minWidth="955" minHeight="600" preloader="com.haso.flex4SH.component.pbarunsee">