ProgressBar.direction

Availability

Flash Player 6 (6.0.79.0).

Edition

Flash MX 2004.

Usage

progressBarInstance.direction

Description

Property; indicates the fill direction for the progress bar. A value of right specifies that the bar will fill from left to right. A value of left specifies that the bar will fill from right to left. The default value is right.

Example

The following code loads a sound object and marks the progress with a progress bar that fills to the left.

You must first drag 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
*/

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.direction = "left";

//Load sound
var my_sound:Sound = new Sound();
my_sound.loadSound("http://www.helpexamples.com/flash/sound/disco.mp3", true);