User Guide
578 FLVPlayback Component (Flash Professional Only)
See also
FLVPlayback.playheadTime, FLVPlayback.state, FLVPlayback.stateChange,
FLVPlayback.stopped, FLVPlayback.totalTime
FLVPlayback.CONNECTION_ERROR
Availability
Flash Player 8.
Edition
Flash Professional 8.
Usage
mx.video.FLVPlayback.CONNECTION_ERROR
Description
A read-only FLVPlayback class property that contains the string constant
"connectionError". You can compare this property to the state property to determine if a
connection error state has occurred.
Example
The following example forces a connection error by specifying an invalid FLV filename
(
nosuch.flv) in the contentPath property. The example uses the CONNECTION_ERROR
property to detect the error in a listener for the
stateChange event.
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/
no_such.flv";
var listenerObject:Object = new Object();
listenerObject.stateChange = function(eventObject:Object):Void {
if(my_FLVPlybk.state == FLVPlayback.CONNECTION_ERROR)
trace("State: " + FLVPlayback.CONNECTION_ERROR);
}
my_FLVPlybk.addEventListener("stateChange", listenerObject);
See also
FLVPlayback.state, FLVPlayback.stateChange