在使用ActionScript中的NetConnection 连接red5 服务器时,出现
Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095: flash.net.NetConnection was unable to invoke callback onBWDone. error=ReferenceError: Error #1069: Property onBWDone not found on RecorderTest and there is no default value.
at RecorderTest()[C:\FlexBuilder\workspace\RecorderTest\RecorderTest.as:21]
错误,根据提示,是在NetConnection中没有找到回调函数onBWDone,并且没有默认值。
解决办法为
netConnection.client = this;
设置netConnection的client为类本身,然后添加函数onBWDone函数:
public function onBWDone():void{}