在用actionscript进行flash stream连接时,经常会报出这个错误。实际上这个错误并不需要添加AsyncErrorEvent的Handler。错误的原因是在客户端call了服务器之后,服务器会返回一个call,需要客户端来处理。
正确的解决办法是
1. 对于private var publishCN:NetConnection = new NetConnection();要添加publishCN.client = this;
2. 添加函数
public function onBWDone(...args):void
{
trace ( "onBWDone! : " + args );
}
有几点要注意的是:
1. 对NetStream对象指定client并不解决问题(netStream.client = this)
2. function onBWDone has to be public, private doesn’t work.
3. addEventListener for AsyncErrorEvent doesn’t solve this problem. Without the listener, the problem will not come out either if function onBWDone is added.
No comments:
Post a Comment