Flash CS3 Documentation |
|||
| ActionScript 2.0 Components Language Reference > FLVPlayback Component > FLVPlayback class > FLVPlayback.playing | |||
Flash Player 8.
Flash Professional 8.
my_FLVPlybk.playing
Property; a Boolean value that is true if the FLV file is in the playing state. Read-only.
The following example listens for occurrences of the stateChange event as it occurs while the FLV file plays. When the event occurs, the example shows the value of the playing property 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.*;
trace(my_FLVPlybk.state + ": playing property is " + my_FLVPlybk.playing);
var listenerObject:Object = new Object();
listenerObject.stateChange = function(eventObject:Object):Void {
trace(my_FLVPlybk.state + ": playing property is " + my_FLVPlybk.playing);
};
my_FLVPlybk.addEventListener("stateChange", listenerObject);
my_FLVPlybk.contentPath = "http://www.helpexamples.com/flash/video/water.flv";
FLVPlayback.playing, FLVPlayback.state, FLVPlayback.stateChange
Flash CS3