Expand my Community achievements bar.

Applications for the 2024-2025 Adobe Experience Manager Champion Program are open!

NetConnection Events Not Working

Avatar

Level 1
How do I listen for errors other than a fault, ex network
error ?



I added listeners ioError and netStatus to NetConnection and
nothing happens.



thanks in advance.
1 Reply

Avatar

Level 3
Check out the ASDoc for flash.net.NetConnection, it should
describe how to listen for events and use responders.



In summar, flash.net.NetConnection uses two forms of handlers
to deal with events. The first kind is the normal AMF "Result" and
"Status" events for a particular invocation - these must be handled
by a flash.net.Responder (or subclass) instance. The second kind is
high level events that may represent catastrophic failures with a
connection/request in general - these you handle for any request by
registering listeners for the ioError, netStatus, securityError,
and asyncError.