
ADOBE FLASH MEDIA INTERACTIVE SERVER
Server-Side ActionScript Language Reference
69
Property summary
Method summary
Event handler summary
NetConnection constructor
new NetConnection()
Creates a new instance of the NetConnection class.
Availability
Flash Communication Server 1.
Returns
A NetConnection object.
Example
The following example creates a new instance of the NetConnection class:
newNC = new NetConnection();
NetConnection.addHeader()
nc.addHeader(name, mustUnderstand, object)
Adds a context header to the Action Message Format (AMF) packet structure. This header is sent with every future
AMF packet. If you call
addHeader() by using the same name, the new header replaces the existing header, and the
new header persists for the duration of the NetConnection object. You can remove a header by calling
addHeader()
with the name of the header to remove and an undefined object.
Availability
Flash Communication Server 1
Property Description
NetConnection.isConnected Read-only; a boolean value indicating whether a connection has been made.
NetConnection.objectEncoding The Action Message Format (AMF) version used to pass binary data between two servers.
NetConnection.uri Read-only; a string indicating the URI parameter of the NetConnection.connect()
method.
Method Description
NetConnection.addHeader() Adds a context header to the Action Message Format (AMF) packet structure.
NetConnection.call() Invokes a command or method on another Flash Media Server or an application server to
which the application instance is connected.
NetConnection.close() Closes the connection with the server.
NetConnection.connect() Connects to another Flash Media Server or to a Flash Remoting server such as Adobe Cold-
Fusion.
Event handler Description
NetConnection.onStatus() Invoked every time the status of the NetConnection object changes.
Commenti su questo manuale