ActionScript 2.0 Components Language Reference |
|
|
|
| FLVPlayback Component > FLVPlayback class > FLVPlayback.bytesLoaded | |||
Flash Player 8.
Flash Professional 8.
my_FLVPlybk.bytesLoaded
Property; a number that indicates the extent of downloading, in number of bytes, for an HTTP download. Returns -1 when there is no stream, when the stream is from a FMS, or if the information is not yet available. The returned value is useful only for an HTTP download. Read-only.
The following example shows the initial value of the bytesLoaded property and its value when the ready event occurs.
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.ready = function(eventObject:Object):Void {
trace("State is " + eventObject.state + "; ready to play");
// display the no. of bytes loaded at this point
trace("Bytes loaded: " + my_FLVPlybk.bytesLoaded);
};
my_FLVPlybk.addEventListener("ready", listenerObject);
my_FLVPlybk.contentPath = "http://www.helpexamples.com/flash/video/water.flv";
trace("Bytes loaded: " + my_FLVPlybk.bytesLoaded); // -1 if loading not begun
|
|
|
|