ActionScript 2.0 Components Language Reference |
|
|
|
| ProgressBar component > ProgressBar.minimum | |||
Flash Player 6 (6.0.79.0).
Flash MX 2004.
progressBarInstance.minimum
Property; the smallest value for the progress bar when the ProgressBar.mode property is set to "manual".
The following example manually increments a ProgressBar component, starting with a minimum value of 100. It displays the increment in the Output panel as the value increases.
Drag an instance of the ProgressBar component onto the Stage, and enter the instance name my_pb in the Property inspector. Add the following code to Frame 1 of the timeline:
/**
Requires:
- ProgressBar component on Stage (instance name: my_pb)
*/
var my_pb:mx.controls.ProgressBar;
//Set progress bar mode
my_pb.mode = "manual";
my_pb.label = "%1 out of %2 loaded";
//minimum numerical value before progress bar increments
my_pb.minimum = 100;
//maximum value of progress bar before it stops
my_pb.maximum = 200;
var increment_num:Number = my_pb.minimum;
this.onEnterFrame = function() {
if (increment_num < my_pb.maximum) {
increment_num++;
//update progress of number incrementing
my_pb.setProgress(increment_num, my_pb.maximum);
trace(increment_num);
} else {
delete this.onEnterFrame;
}
};
ProgressBar.maximum, ProgressBar.mode
|
|
|
|