play a flv video, and if the video is missing or when i have error play another one in another location
hello,
First sorry for my english, i use to speak french, and i'm really new in flash so
here is my problem
i want to play a flv video locate in my hardisk
i'm using this
var vid:Video;
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
ns.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);
var customClient:Object = new Object();
customClient.onMetaData = metaDataHandler;
ns.client = customClient;
ns.play("../docs/video1.flv");
vid = new Video();
vid.attachNetStream(ns);
addChild(vid);
function asyncErrorHandler(event:AsyncErrorEvent):void
{
trace(event.text);
}
function metaDataHandler(infoObject:Object):void {
vid.width = infoObject.width;
vid.height = infoObject.height;
}
it's working with no problem.
but i want to add a condition in case the video can be play for any reason ( video is missing, wrong name, wrong format, any error...)
in this case i want flash to play another video locate in a other place
i hope is clear enough, and i hope someone can help me with that
thank you