Flash CS3 Documentation |
|||
| ActionScript 2.0 Components Language Reference > FLVPlayback Component > FLVPlayback class > FLVPlayback.state | |||
Flash Player 8.
Flash Professional 8.
my_FLVPlybk.state
Property; a string that specifies the state of the component. This property is set by the load(), play(), stop(), pause(), and seek() methods. Read-only.
The possible values for the state property are: "buffering", "connectionError", "disconnected", "loading", "paused", "playing", "rewinding", "seeking", and "stopped". You can use the FLVPlayback class properties to test for these states. For more information, see FLVPlayback Class properties.
The following example shows the state property in the Output panel each time the stateChange event occurs while the FLV file plays.
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.stateChange = function(eventObject:Object):Void {
trace(my_FLVPlybk.state);
};
my_FLVPlybk.addEventListener("stateChange", listenerObject);
my_FLVPlybk.contentPath = "http://www.helpexamples.com/flash/video/water.flv";
FLVPlayback.addEventListener(), FLVPlayback.buffering, FLVPlayback.paused, FLVPlayback.playing, FLVPlayback.stateChange, FLVPlayback.stopped
Flash CS3