ActionScript 2.0 Language Reference |
|
|
|
| ActionScript classes > XMLSocket > onClose (XMLSocket.onClose handler) | |||
onClose = function() {}
Invoked only when an open connection is closed by the server. The default implementation of this method performs no actions. To override the default implementation, you must assign a function containing custom actions.
Availability: ActionScript 1.0; Flash Player 5
The following example executes a trace statement if an open connection is closed by the server:
var socket:XMLSocket = new XMLSocket();
socket.connect(null, 2000);
socket.onClose = function () {
trace("Connection to server lost.");
}
onConnect (XMLSocket.onConnect handler), function statement
|
|
|
|