NetStream Errors if no AsyncErrorEvent handler specified
This one kind of bugs me. If you don’t create an event handler on the flex/flash NetStream object for the AsyncErrorEvent and you call the NetStream.play function you will get the following errors. Well, you will see it in the flash debug player.
ERRORS:
Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095: flash.net.NetStream was unable to invoke callback onMetaData. error=ReferenceError: Error #1069: Property onMetaData not found on flash.net.NetStream and there is no default value.Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095: flash.net.NetStream was unable to invoke callback onPlayStatus. error=ReferenceError: Error #1069: Property onPlayStatus not found on flash.net.NetStream and there is no default value. To solve this add the following code:
var ns: NetStream = new NetStream(nch.nc);
ns.addEventListener(AsyncErrorEvent.ASYNC_ERROR, ayncErrorHandler);public function ayncErrorHandler(event: AsyncErrorEvent): void {
// ignore for now
}Similar problem with the NetConnection object and the NetStatusEvent:
addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler)
10.09.07
by Steve Gudmundson