ActionScript 2.0 Components Language Reference |
|
|
|
| FLVPlayback Component > FLVPlayback class > FLVPlayback.PLAYING | |||
Flash Player 8.
Flash Professional 8.
mx.video.FLVPlayback.PLAYING
A read-only FLVPlayback class property that contains the string constant, "playing". You can compare this property to the state property to determine if the component is in the playing state.
The following example uses the FLVPlayback.PLAYING property to see if the state equals "playing" when a stateChange event occurs. It also includes the constant as part of a message in the Output panel.
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.contentPath = "http://www.helpexamples.com/flash/video/water.flv";
var listenerObject:Object = new Object();
listenerObject.stateChange = function(eventObject:Object):Void {
if(eventObject.state == FLVPlayback.PLAYING)
trace(my_FLVPlybk.contentPath + " is now " + FLVPlayback.PLAYING);
}
my_FLVPlybk.addEventListener("stateChange", listenerObject);
FLVPlayback.state, FLVPlayback.stateChange
|
|
|
|