【问题标题】:Command the preloader to track the progress of the download in ActionScript 3命令预加载器在 ActionScript 3 中跟踪下载进度
【发布时间】:2011-01-14 08:53:22
【问题描述】:

如何命令预加载器跟踪下载进度?

 public function loadImage(filename:String):void
        {
            // show the preloader
            preloader.visible = true;

    // set the source to the UILoader to the full size image to load and display

            addChild(preloader);

            // 
            var loadWindow:UILoader;    
        preloader.trackLoading("LOADING: " + (loader*100).toFixed(0) + "%");


        }

【问题讨论】:

  • 你只是在做一个标准的 SWF 预加载器吗?

标签: actionscript-3 image image-gallery preloader image-preloader


【解决方案1】:

监听 UILoader 的 bytesLoaded 和 bytesTotal 属性

查看此链接了解有关 UILoader 的更多信息,页面底部有示例。
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/fl/containers/UILoader.html

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2010-10-22
    • 1970-01-01
    • 1970-01-01
    • 2010-10-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多