用as检测服务器端的某个flv文件是否存在的代码
作者:
用as检测服务器端的某个flv文件是否存在的代码
var my_nc:NetConnection = new NetConnection ();
my_nc.connect (null);
var my_ns:NetStream = new NetStream (my_nc);
MyVideo.attachVideo (my_ns);
my_ns.play ("xx.flv");
my_ns.onStatus = function (obj) {
if (obj.code == "NetStream.Play.StreamNotFound") {
trace ("找不到FLV文件");
}
}
my_nc.connect (null);
var my_ns:NetStream = new NetStream (my_nc);
MyVideo.attachVideo (my_ns);
my_ns.play ("xx.flv");
my_ns.onStatus = function (obj) {
if (obj.code == "NetStream.Play.StreamNotFound") {
trace ("找不到FLV文件");
}
}