
102
SERVER-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR ADOBE MEDIA SERVER 5.0.1
Server-Side ActionScript Language Reference
Last updated 7/2/2013
nc = new NetConnection();
nc.connect("rtmp://tc.foo.com/myApp");
nc.onStatus = function(infoObj){
if (info.code == "NetConnection.Connect.Success" && nc.isConnected){
trace("We are connected");
}
};
NetConnection.nearID
nc.nearId
A String.
Read-only. A String indentifier of this Adobe Media Server instance for this NetConnection session. This property is
meaningful only for RTMFP connections.
Availability
Flash Media Server 4
See also
NetConnection.farID
NetConnection.nearNonce
nc.nearNonce
Read-only. A String unique to this connection. This value appears to another server as its NetConnection.farNonce
value. This value is defined for RTMFP, RTMPE, and RTMPTE connections.
Availability
Flash Media Server 4
See also
“NetConnection.farNonce” on page 101
NetConnection.objectEncoding
nc.objectEncoding
The Action Message Format (AMF) version used to pass binary data between two servers. The possible values are 3
(ActionScript 3.0 format) and 0 (ActionScript 1.0 and ActionScript 2.0 format). The default value is 3. When Adobe
Media Server acts as a client trying to connect to another server, the encoding of the client should match the encoding
of the remote server.
Flash Media Server versions 1 and 2 support AMF0. Flash Media Server versions 3 and later support AMF0 and AMF3.
The value of objectEncoding is determined dynamically according to the following rules when the server receives a
NetConnection.onStatus() event with the code property NetConnection.Connect.Success:
• If the onStatus()info object contains an objectEncoding property, its value is used.
• If the onStatus()info object does not contain an objectEncoding property, 0 is assumed even if the connecting
server has set
objectEncoding to 3.
Kommentare zu diesen Handbüchern