您好,我正在尝试使用 fms 4.5 将我的相机捕获为 flv 文件,我正在执行以下操作:
protected function rec_clickHandler(event:MouseEvent):void
{
nc = new NetConnection();
nc.client = { onBWDone: function():void{ trace("onBWDone") } };
nc.connect("rtmp://localhost/vod");
nc.addEventListener(NetStatusEvent.NET_STATUS,netStatusHandler);
}
private function netStatusHandler(e:NetStatusEvent):void {
var code:String = e.info.code;
if(code == "NetConnection.Connect.Success"){ //in case of recording...
ns = new NetStream(nc);
ns.attachCamera(cam);
ns.attachAudio(mic);
ns.publish("filename","record");
}
else{
trace(code);
}
}
但我收到以下错误:
Error #2044: Unhandled NetStatusEvent:. level=error, code=NetStream.Record.NoAccess
任何人都可以帮忙吗?我究竟做错了什么?