Description
Property (read-only); the number of bytes of content that have been loaded. The default value is 0
until content begins loading.
Example
The following code creates a progress bar and a Loader component. It then creates a listener
object with a
progress
registered with the
createClassObject(mx.controls.ProgressBar, "pBar", 0);
createClassObject(mx.controls.Loader, "loader", 1);
loadListener = new Object();
loadListener.progress = function(eventObj){
// eventObj.target is the component that generated the progress event,
// that is, the loader
pBar.setProgress(loader.bytesLoaded, loader.bytesTotal); // show progress
}
loader.addEventListener("progress", loadListener);
loader.content = "logo.swf";
When you create an instance with
with
and
move()
See also
Loader.bytesTotal
Loader.bytesTotal
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX 2004.
Usage
loaderInstance.bytesTotal
Description
Property (read-only); the size of the content, in bytes. The default value is 0 until content
begins loading.
Example
The following code creates a progress bar and a Loader component. It then creates a load listener
object with a
progress
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){
490
Chapter 6: Components Dictionary
event handler that shows the progress of the load. The listener is
instance.
loader
createClassObject()
. See
setSize()
UIObject.move()
,
UIObject.createClassObject()
event handler that shows the progress of the load. The listener is
, you have to position it on the Stage
and
UIObject.setSize()
.
Need help?
Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?
Questions and answers