ProgressBar.mode

Availability

Flash Player 6.0.79.

Edition

Flash MX 2004.

Usage

pBarInstance.mode

Description

Property; the mode in which the progress bar loads content. This value can be one of the following: "event", "polled", or "manual". The most commonly used modes are "event" and "polled". These modes use the source parameter to specify a loading process that either emits progress and complete events, like a Loader component (event mode), or exposes getBytesLoaded and getsBytesTotal methods, like a MovieClip object (polled mode). You can also use the ProgressBar component in manual mode by manually setting the maximum, minimum, and indeterminate properties along with calls to the ProgressBar.setProgress() method.

A Loader object should be used as the source in event mode. Any object that exposes getBytesLoaded() and getBytesTotal() methods can be used as a source in polled mode. (Including a custom object or the _root object)

Example

The following code sets the progress bar to event mode:

pBar.mode = "event";