ProgressBar.conversion
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX 2004.
Usage
progressBarInstance.conversion
Description
Property; a number that sets a conversion value for the incoming values. It divides the current
and total values, floors them, and displays the converted value in the
default value is 1.
The floor is the closest integer value that is less than or equal to the specified value. For
example, the number 4.6 becomes 4.
Example
The following code displays the progress of loading a sound object by dividing the number of
bytes loaded by a conversion value of 1024 to produce a value in kilobytes.
You must first drag a ProgressBar component from the Component's panel to the current
document's library; then add the following code to Frame 1 of the main timeline:
/**
Requires:
- ProgressBar component in library
*/
System.security.allowDomain("http://www.helpexamples.com");
this.createClassObject(mx.controls.ProgressBar, "my_pb", 20);
//Set progress bar attributes
my_pb.mode = "polled";
my_pb.source = "my_sound";
my_pb.label = "%1 kb loaded";
my_pb.conversion = 1024;
//Load sound
var my_sound:Sound = new Sound();
my_sound.loadSound("http://www.helpexamples.com/flash/sound/disco.mp3",
true);
property. The
label
ProgressBar.conversion 1005
Need help?
Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?
Questions and answers