![]() ![]() ![]() | |
![]() | |
![]() | |
![]() |
Flash Player 6.0.79.
Flash MX 2004.
loaderInstance
.bytesTotal
Property (read-only); the size of the content in bytes. The default value is 0 until content begins loading.
The following code creates a ProgressBar and a Loader component. It then creates a load listener object with a progress event handler that shows the progress of the load. The listener is registered with the loader instance, as follows:
createClassObject(mx.controls.ProgressBar, "pBar", 0); createClassObject(mx.controls.Loader, "loader", 1); loadListener = new Object(); loadListener.progress = function(eventObj){ // eventObj.target is the component which generated the change event, // i.e., the Loader. pBar.setProgress(loader.bytesLoaded, loader.bytesTotal); // show progress } loader.addEventListener("progress", loadListener); loader.content = "logo.swf";
![]() | |
![]() | |
![]() | |
![]() ![]() ![]() |