Once the connection between client and server is made, it can break for various reasons. The network might go down, the server might stop, or the connection might be closed from the server or the client. Any change in the connection status creates a netStatus event, which has both a code and a level property describing the change. This is one code and level combination:
|
Code |
Level |
Meaning |
|
NetConnection.Connect.Success |
status |
A connection has been established successfully. |
See NetStatus.info in the ActionScript 3.0 Language and Components Reference for a complete list of all code and level values that can be returned in a netStatus event.
When the event is returned, you can access the connection code and level with event.info.code and event.info.level. You can also check the NetConnection.connected property (which has a value of true or false) to see if the connection still exists. If the connection can't be made or becomes unavailable, you need to take some action from the application client.