
103
SERVER-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR ADOBE MEDIA SERVER 5.0.1
Server-Side ActionScript Language Reference
Last updated 7/2/2013
• Once the NetConnection instance is connected, the objectEncoding property is read-only.
These rules turn Flash Media Server 3 into an AMF0 client when it connects to a remote Flash Media Server version 2
or earlier (which only support AMF0).
Note: The server always serializes data in AMF0 while executing Flash Remoting functions.
Availability
Flash Media Server 3
NetConnection.onStatus()
nc.onStatus = function(infoObject) {}
Invoked every time the status of the NetConnection object changes. For example, if the connection with the server is
lost in an RTMP connection, the
NetConnection.isConnected property is set to false, and
NetConnection.onStatus() is invoked with a status message of NetConnection.Connect.Closed. For AMF
connections,
NetConnection.onStatus() is used only to indicate a failed connection. Use this event handler to
check for connectivity.
Availability
Flash Communication Server 1
Parameters
infoObject An Object with properties that provide information about the status of a NetConnection information
object. This parameter is optional, but it is usually used. The NetConnection information object contains the following
properties:
The following table contains the code and level property values and their meanings:
Property Meaning
code A string identifying the event that occurred.
description A string containing detailed information about the code. Not every information object includes this property.
level A string indicating the severity of the event.
Code Level Meaning
NetConnection.Call.Failed error The NetConnection.call() method was not able to invoke the
server-side method or command.
NetConnection.Connect.AppShutdown error The application has been shut down (for example, if the application is
out of memory resources and must shut down to prevent the server
from crashing) or the server has shut down.
NetConnection.Connect.Closed status The connection was closed successfully.
NetConnection.Connect.Failed error The connection attempt failed.
Commenti su questo manuale