xmlns:mx="http://www.adobe.com/2006/mxml">
import mx.controls.Alert;
import mx.events.VideoEvent;
private function onError(evt:VideoEvent):void {
switch (evt.state) {
case VideoEvent.CONNECTION_ERROR:
evt.currentTarget.visible = false;
Alert.show(evt.currentTarget.source, "Failed to connect to video");
break;
}
}
source="http://server.com/a.flv"
stateChange="onError(event);" />