ActionScript 2.0 Components Language Reference |
|
|
|
| ProgressBar component > ProgressBar.indeterminate | |||
Flash Player 6 (6.0.79.0).
Flash MX 2004.
progressBarInstance.indeterminate
Property; a Boolean value that indicates whether the progress bar has a striped fill and a loading source of unknown size (true), or a solid fill and a loading source of a known size (false). For example, you might use this property if you are loading a large data set into a SWF file and do not know the size of the data you are loading.
The following code creates an indeterminate progress bar that moves from left to right with a striped fill.
You must first drag a Loader component and a ProgressBar component from the Components panel to the current document's library; then add the following code to Frame 1 of the main timeline:
/**
Requires:
- ProgressBar component in library
- Loader component in library
*/
System.security.allowDomain("http://www.helpexamples.com");
this.createClassObject(mx.controls.ProgressBar, "my_pb", 10);
this.createClassObject(mx.controls.Loader, "my_ldr", 20);
//Create Listener Object
var pbListener:Object = new Object();
pbListener.complete = function(evt_obj:Object) {
trace("Height: " + evt_obj.target.height + ", Width: " + evt_obj.target.width);};
//Add Listener
my_pb.addEventListener("complete", pbListener);
//Set progress bar settings
my_pb.mode = "polled";
my_pb.indeterminate = true;
my_pb.source = my_ldr;
//Set loader settings
my_ldr.autoLoad = false;
my_ldr.scaleContent = false;
my_ldr.move(100, 100)
my_ldr.load("http://www.helpexamples.com/flash/images/image1.jpg");
|
|
|
|