Server-Side Communication ActionScript > Application (object) |
![]() ![]() ![]() |
Application (object)
The Application object contains information about a Flash Communication Server application instance that lasts until the application instance is unloaded. A Flash Communication Server application is a collection of stream objects, shared objects, and clients (connected users). Each application has a unique name, and you can use the naming scheme described in Using naming conventions to create multiple instances of an application.
The Application object lets you accept and reject client connection attempts, register and unregister classes and proxies, and create functions that are invoked when an application starts or stops or when a client connects or disconnects.
Besides the built-in properties of the Application object, you can create other properties of any legal ActionScript type, including references to other ActionScript objects. For example, the following lines of code create a new property of type array
and a new property of type number
:
application.myarray = new Array(); application.num_requests = 1;
Method Description Accepts a connection to an application from a client. Clears all shared objects associated with the current instance. Clears all stream objects associated with the current instance. Disconnects a client from the server. Returns network statistics for the application instance. Registers or unregisters a constructor that is called during object deserialization. Registers a NetConnection or Client object to fulfill a method request. Rejects a connection to an application.
Method summary for the Application object
Property (read-only) Description An object containing a list of all clients currently connected to the application. The hostname of the server for default virtual hosts, and virtual hostname for non-default virtual hosts. The name of an application instance. The platform and version of the server.
Property summary for the Application object
Event handler Description Invoked when the application is loaded by the server. Invoked when the application is unloaded by the server. Invoked when a client connects to the application. Invoked when a client successfully connects to the application; for use with communication components only. Invoked when a client fails to connect to the application; for use with communication components only. Invoked when a client disconnects from the application. Invoked when a script generates an error.
Event handler summary for the Application object
![]() ![]() ![]() |