FLVPlayback.volumeBarInterval

Availability

Flash Player 8.

Edition

Flash Professional 8.

Usage

my_FLVPlybk.volumeBarInterval

Description

Property; a number that specifies, in milliseconds, how often to check the volume bar handle location when scrubbing. The default is 250.

Example

The following example sets the volumeBarInterval property to 1 second (1000 milliseconds) and creates a volumeUpdate event that shows the playhead time and the volume as the user drags the handle on the volume bar. The volumeUpdate events occur at approximately 1 second intervals because of the volumeBarInterval setting.

Drag an FLVPlayback component to the Stage, and give it an instance name of my_FLVPlybk. Then add the following code to the Actions panel on Frame 1 of the Timeline:

/**
 Requires:
  - FLVPlayback component on the Stage with an instance name of my_FLVPlybk
*/
import mx.video.*;
my_FLVPlybk.volumeBarInterval = 1000;
var listenerObject:Object = new Object();
listenerObject.volumeUpdate = function(eventObject:Object) {
        trace("Playhead time is: " + my_FLVPlybk.playheadTime);
        trace("Volume is: " + my_FLVPlybk.volume);
};
my_FLVPlybk.addEventListener("volumeUpdate", listenerObject);
my_FLVPlybk.contentPath = "http://www.helpexamples.com/flash/video/cuepoints.flv";

See also

FLVPlayback.volume, FLVPlayback.volumeBar, FLVPlayback.volumeBarScrubTolerance, FLVPlayback.volumeUpdate