开发者

Command the preloader to track the progress of the download in ActionScript 3

开发者 https://www.devze.com 2023-02-04 20:51 出处:网络
How can I command the pre-loader to track the progress of the download? public function loadImage(filename:String):void

How can I command the pre-loader to track the progress of the download?

 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);开发者_如何学Python

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


        }


Listen to the bytesLoaded & bytesTotal properties of the UILoader

Check this link for more info on the UILoader, there are examples at the bottom of the page.
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/fl/containers/UILoader.html

0

精彩评论

暂无评论...
验证码 换一张
取 消