MACROMEDIA FLASH MEDIA SERVER 2-SERVER-SIDE ACTIONSCRIPT LANGUAGE Reference page 109

Server-side actionscript language reference
Table of Contents

Advertisement

If the
Application.allowDebug
To provide total security against debug connections, set
in the application.xml file. This setting overrides debug connections that are
false
approved in server-side code.
If the connection is approved,
If you can use the
Escaping the connection URI
It is important to convert (or escape) special characters in any URI used to connect to Flash
Media Server to URL-encoding. If you do not escape special characters, shared objects cannot
function correctly over an Internet connection. Escaping URIs is especially important when
creating a debugging connection because there are special characters in the debugging
property that must be appended to the URI. Use the following code to escape a URI:
function escapeURI(uri){
index = uri.indexOf('?');
if (index == -1){
return uri;
}
prefix = uri.substring(0, index);
uri = uri.substring(index);
return prefix += escape(uri);
}
basicString = "rtmp://serverName/appName/
instance?_fcsdebug_req=someNumber";
escapedString = escapeURI(BasicString);
nc.connect(EscapedString);
Example
The following example creates an RTMP connection to a Flash Media Server for the
instance of NetConnection:
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/");
property is
Services.onDebugConnect
handler to reject the connection.
onConnect
, the connection is approved.
true
application.allowDebug
is invoked.
NetConnection class
to
myConn
myConn
109

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MEDIA SERVER 2-SERVER-SIDE ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

This manual is also suitable for:

Flash media server 2

Table of Contents