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
精彩评论