ProgressBar.setProgress()

Availability

Flash Player 6.0.79.

Edition

Flash MX 2004.

Usage

pBarInstance.setProgress(completed, total)

Parameters

completed a number indicating the amount of progress that has been made. You can use the ProgressBar.label and ProgressBar.conversion properties to display the number in percentage form or any units you choose, depending on the source of the progress bar.

total a number indicating the total progress that must be made to reach 100 percent.

Returns

A number indicating the amount of progress that has been made.

Description

Method; sets the state of the bar to reflect the amount of progress made when the ProgressBar.mode property is set to "manual". You can call this method to make the bar reflect the state of a process other than loading. The argument completed is assigned to value property and argument total is assigned to the maximum property. The minimum property is not altered.

Example

The following code calls the setProgress() method based on the progress of a Flash application's Timeline:

pBar.setProgress(_currentFrame, _totalFrames);