Question

I'm working on implementing communication between an Adobe AIR app and a browser Flash object, and the LocalConnection documentation mentions an asyncError as a potential event:

asyncError: Dispatched when an exception is thrown asynchronously — that is, from native asynchronous code.

However, that's the only documentation I can find on it. Does anyone know what this error actually means? I've searched around but couldn't find any reference -- most sample code I found does an addEventListener() for the asyncError but doesn't give any clue as to what it means or when it could occur (i.e. if it could occur when sending or when recieving).

The Adobe documentation page also lists potential events for each method, but asyncError isn't listed under any specific method, only for the general class.

Has anyone ever had an asyncError occur?

Thanks!

Was it helpful?

Solution

This error is also dispatched from NetConnection. In that case it's used as expected: to handle errors thrown asynchronously by the connection. In the handler for the NetConnection if you do something like:

trace(event.text); 

You will get something back like:

Error #2095: flash.net.NetStream was unable to invoke callback onMetaData. 

You can use the same technique to figure out why the LocalConnection is throwing this error and handle it according to the message.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top