The Application object operates under the application instance. Variables, functions, and objects defined within this object are available to every client that connects to a specific instance. Application objects within other instances are not accessible. Application MethodsThe application methods are described in the following sections. application.acceptConnection(clientObj)Accepts incoming connection requests from Communication clients. Clients cannot access resources until this method is run. ClientObj is the client URI requesting access. application.clearSharedObjects(soPath);Deletes persistent and temporary SharedObjects from the instance it was called from.
application.clearStreams(streamPath);Removes all publish and subscription streams from all clients and servers within the instance it was called from.
application.disconnect(clientObj)Disconnects the client from the application instance.
application.registerClass(className, constructor)Allows a constructor to be registered or unregistered within the application instance. This is called during deserialization.
application.registerProxy(methodName, proxyConnection [, proxyMethodName])Redirects a method request to a NetConnection or a client method proxy.
application.rejectConnection(clientObj, errObj)Rejects incoming connection requests from Communication clients. Clients cannot access any instance resources.
Application Propertiesapplication.clients returns an object containing a list of all clients connected to the application instance. application.name returns the current application instance name. application.server returns the current server version and platform. Application Eventsapplication.onAppStart is invoked by an application instance, which is loaded by a client request or the App Inspector. application.onAppStop is invoked when the application is shut down or unloaded from the server. application.onConnect is invoked by a client's NetConnection.connect request. This method is used to handle the acceptConnection method. application.onDisconnect is invoked by a client's NetConnection.close method, or if the client's connection is broken or the Flash movie is shut down or reloaded. application.onStatus is invoked internally when a method or server-side ActionScript (SSAS) produces an error. |