MACROMEDIA FLASH MEDIA SERVER 2-SERVER MANAGEMENT ACTIONSCRIPT LANGUAGE Manuale Utente Pagina 75

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 155
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 74
ADOBE FLASH MEDIA INTERACTIVE SERVER
Server-Side ActionScript Language Reference
72
Parameters
URI A string indicating a URI to connect to. URI has the following format:
[protocol://]host[:port]/appName[/instanceName]
The following are legal URIs:
http://appServer.mydomain.com/webApp
rtmp://rtserver.mydomain.com/realtimeApp
rtmps://rtserver.mydomain.com/secureApp
rtmp://localhost/realtimeApp
rtmp:/realtimeApp
p1, ..., pN
Optional parameters that can be of any ActionScript type, including references to other ActionScript
objects. These parameters are sent as connection parameters to the
application.onConnect() event handler for
RTMP connections. For AMF connections to application servers, RTMP parameters are ignored.
Returns
For RTMP connections, a boolean value of
true for success; otherwise, false. For AMF connections to application
servers,
true is always returned.
Example
The following example creates an RTMP connection to an application instance on Flash Media Server:
nc = new NetConnection();
nc.connect("rtmp://tc.foo.com/myApp/myConn");
NetConnection.isConnected
nc.isConnected
Read-only; a boolean value indicating whether a connection has been made. It is set to true if there is a connection
to the server. Its a good idea to check this property value in an
onStatus() callback function. This property is always
true for AMF connections to application servers.
Availability
Flash Communication Server 1
Example
The following example uses
NetConnection.isConnected in an onStatus() handler to check whether a
connection has been made:
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.objectEncoding
nc.objectEncoding
Vedere la pagina 74
1 2 ... 70 71 72 73 74 75 76 77 78 79 80 ... 154 155

Commenti su questo manuale

Nessun commento