package 
{
    import mx.preloaders.*; 
    import flash.events.ProgressEvent;
    import mx.controls.Image;
    
 1、新建 一个
myProgressBars .as文件
public class myProgressBars extends DownloadProgressBar {
    
        public function myProgressBars() { 
            super();
            var img:Image;            
             //加载背景图片没有成功,如果哪位知道 请赐教
            this.backgroundImage = img;
            
            downloadingLabel="正在下载应用Flex自定义Preloader";

            initializingLabel="初始化应用Flex自定义Preloader";

            MINIMUM_DISPLAY_TIME=2000;
        }

        override protected function showDisplayForInit( elapsedTime:int, count:int):Boolean {
            return true;
        }
        
        override protected function showDisplayForDownloading( elapsedTime:int, event:ProgressEvent):Boolean {
            return true;
        }
    }
}

2、
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
     preloader="myProgressBars"  //加入这一行

相关文章:

  • 2022-01-09
  • 2021-12-17
  • 2021-10-25
  • 2021-09-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-30
  • 2021-05-22
  • 2021-08-31
  • 2021-07-01
  • 2021-12-23
  • 2022-01-17
相关资源
相似解决方案