MACROMEDIA FLASH MX 2004-USING COMPONENTS Use Manual page 616

Using components
Hide thumbs Also See for FLASH MX 2004-USING COMPONENTS:
Table of Contents

Advertisement

Description
Property; the mode in which the progress bar loads content. This value can be
, or
"polled"
"manual"
Event mode and polled mode are the most common modes. In event mode, the
specifies loading content that emits
object in this mode. In polled mode, the
MovieClip object) that exposes
object that exposes these methods can be used as a source in polled mode (including a custom
object or the root Timeline).
You can also use the ProgressBar component in manual mode by manually setting the
, and
minimum
indeterminate
method.
Example
The following code sets the progress bar to event mode. Drag an instance of the ProgressBar
component onto the Stage, and enter the instance name
instance of the Loader component onto the Stage, and enter an instance name
Property inspector. Add the following code to Frame 1 of the Timeline:
var my_pb:mx.controls.ProgressBar;
var my_ldr:mx.controls.Loader;
var pbListener:Object = new Object();
pbListener.complete = function(evt:Object) {
evt.target._visible = false;
};
my_pb.addEventListener("complete", pbListener);
my_pb.mode = "polled";
my_pb.indeterminate = true;
my_pb.source = my_ldr;
my_ldr.autoLoad = false;
my_ldr.scaleContent = false;
my_ldr.load("http://www.macromedia.com/software/flex/images/
flex_presentation_eyes.jpg");
ProgressBar.percentComplete
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX 2004.
Usage
pBarInstance.percentComplete
616
Chapter 6: Components Dictionary
.
progress
source
getBytesLoaded()
properties and making calls to the
and
events; you should use a Loader
complete
property specifies loading content (such as a
and
getsBytesTotal()
ProgressBar.setProgress()
in the Property inspector. Drag an
my_pb
,
"event"
property
source
methods. Any
,
maximum
in the
my_ldr

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash mx

Table of Contents