开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜