Description
Method; accepts the connection call from a client to the server. The
application.onConnect
NetConnection.connect()
application.acceptConnection()
to accept a connection from a client. You can use the
method outside an
application.onConnect
had been placed in a pending state (for example, to verify a user name and password).
When you use components and your code includes an explicit call to
application.acceptConnection()
(in order of execution) of the
application.acceptConnection()
logic that follows the explicit
placed in
application.onConnectAccept
statements, or it will be ignored. This requirement exists only when you use components.
Example
The following example uses the
connection from
client1
application.onConnect = function (client1){
// Insert code here.
application.acceptConnection(client1);
client1.call("welcome");
};
This example shows code from an application that does not use components.
See also
Application.onConnect
Application.allowDebug
Availability
Flash Media Server 2.
Usage
application.allowDebug
18
Server-Side ActionScript Language Reference
event handler is invoked on the server side to notify a script when
is called from the client side. You can use the
method in an
event handler to accept a client connection that
or
application.rejectConnection()
event handler should be either
onConnect
or
application.rejectConnection()
acceptConnection
and
application.acceptConnection()
:
,
Application.rejectConnection()
application.onConnect
application.acceptConnection()
or
rejectConnection
application.onConnectReject
event handler
, the last line
. Also, any
statement must be
method to accept the
Need help?
Do you have a question about the FLASH MEDIA SERVER 2-SERVER-SIDE ACTIONSCRIPT LANGUAGE and is the answer not in the manual?