Netconnection.connect; Netconnection.isconnected - MACROMEDIA FLASH COMMUNICATION SERVER MX-SERVER-SIDE COMMUNICATION ACTIONSCRIPT DICTIONARY Manual

Server-side communication actionscript dictionary
Table of Contents

Advertisement

Example
The following code closes the NetConnection instance
myNetConn.close();

NetConnection.connect

Availability
Flash Communication Server MX.
Usage
myNetConnection.connect(URI, [p1, ..., pN])
Parameters
A URI to connect to.
URI
Optional parameters that can be of any ActionScript type, including references to
p1, ..., pN
other ActionScript objects. These parameters are sent as connection parameters to the
application.onConnect
application servers, any RTMP parameters are ignored.
Returns
For RTMP connections, a Boolean value of
connections to application servers,
Description
Method; connects to the host. The host URI has the following format:
[protocol://]host[:port]/appName[/instanceName]
For example, the following are legal URIs:
http://appServer.mydomain.com/webApp
rtmp://rtserver.mydomain.com/realtimeApp
It is good practice to write an

NetConnection.isConnected

connection was made. For Action Message Format connections, check
NetConnection.onStatus
Example
This example creates an RTMP connection to another Flash Communication Server for the
instance of NetConnection:
myConn
myConn = new NetConnection();
myConn.connect("rtmp://tc.foo.com/myApp/myConn");
The following example creates an AMF connection to an application server for the
instance of NetConnection:
myConn = new NetConnection();
myConn.connect("http://www.xyz.com/myApp/");
NetConnection.isConnected
Availability
Flash Communication Server MX.
38
event handler for RTMP connections. For AMF connections to
true
is always returned.
true
application.onStatus
property for RTMP connections to see whether a successful
.
:
myNetConn
for success;
otherwise. For AMF
false
callback function and check the
myConn

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH COMMUNICATION SERVER MX-SERVER-SIDE COMMUNICATION ACTIONSCRIPT DICTIONARY and is the answer not in the manual?

This manual is also suitable for:

Flash communication server mx

Table of Contents