ActionScript 2.0 Components Language Reference |
|
|
|
| FLVPlayback Component > FLVPlayback class > FLVPlayback.volumeUpdate | |||
Flash Player 8.
Flash Professional 8.
varlistenerObject:Object = new Object();listenerObject.volumeUpdate = function(eventObject:Object):Void {// insert event-handling code here}; my_FLVplybk.addEventListener("volumeUpdate",listenerObject);
Event; dispatched when the volume changes either by the user moving the handle of the volumeBar control or by setting the volume property in ActionScript. The event object has a volume property.
The following example shows the value of the volume property in the Output panel for any adjustments that the user makes to the volume.
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.*;
var listenerObject:Object = new Object();
listenerObject.volumeUpdate = function(eventObject:Object):Void {
trace("Volume setting is: " + eventObject.volume);
};
my_FLVPlybk.addEventListener("volumeUpdate", listenerObject);
my_FLVPlybk.contentPath = "http://www.helpexamples.com/flash/video/cuepoints.flv";
FLVPlayback.addEventListener()FLVPlayback.volume, FLVPlayback.volumeBar
|
|
|
|