ActionScript 2.0 Components Language Reference |
|
|
|
| FLVPlayback Component > FLVPlayback class > FLVPlayback.LOADING | |||
Flash Player 8.
Flash Professional 8.
mx.video.FLVPlayback.LOADING
A read-only FLVPlayback class property that contains the string constant, "loading". You can compare this property to the state property to determine whether the component is in the loading state.
The following example displays the value of the FLVPlayback.LOADING property if the FLV file is in the loading state.
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 {
if(my_FLVPlybk.state == FLVPlayback.LOADING)
trace("State is " + FLVPlayback.LOADING);
}
my_FLVPlybk.addEventListener("stateChange", listenerObject);
my_FLVPlybk.contentPath = "http://www.helpexamples.com/flash/video/water.flv";
FLVPlayback.state, FLVPlayback.stateChange
|
|
|
|