Description
Property (read-only); tells what percentage of the content has been loaded. This value is floored.
(The floor is the closest integer value that is less than or equal to the specified value. For example,
the number 7.8 becomes 7.) The following formula is used to calculate the percentage:
100*(value-minimum)/(maximum-minimum)
Example
The following code sends the value of the
trace("percent complete = " + pBar.percentComplete);
ProgressBar.progress
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX 2004.
Usage
Usage 1:
on(progress){
...
}
Usage 2:
listenerObject = new Object();
listenerObject.progress = function(eventObject){
...
}
pBarInstance.addEventListener("progress", listenerObject)
Event object
In addition to the standard event object properties, there are two additional properties defined
for the
ProgressBar.progress
total value).
Description
Event; broadcast to all registered listeners whenever the value of a progress bar changes. This event
is broadcast only when
The first usage example uses an
instance. The keyword
component instance. For example, the following code, attached to the instance
"_level0.myPBar" to the Output panel:
on(progress){
trace(this);
}
percentComplete
event:
current
is set to
ProgressBar.mode
handler and must be attached directly to a ProgressBar
on()
, used inside an
this
on()
property to the Output panel:
(the loaded value equals
or
"manual"
"polled"
handler attached to a component, refers to the
ProgressBar component
), and
(the
total
total
.
, sends
myPBar
617
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