Macromedia flash media server 2-server-side actionscript language reference Manual De Usuario

Descargar
Página de 74
14
Server Management ActionScript Language Reference
Example
The following three examples show how you can specify parameters in a call to the 
addAdmin
 
command:
/* Adds a server administrator named "GLee" with password "boat4907" */
nc.call("addAdmin", new onAddAdmin(), "GLee", "boat4907", "server");
/* Adds a virtual host administrator named "ChrisM" with password "tree2981" 
*/
nc.call("addAdmin", new onAddAdmin(), "ChrisM", "tree2981");
/* Adds a virtual host administrator "DHong" with password "wate3235" */
/* for vhost tree.oak.com */
nc.call("addAdmin", new onAddAdmin(), "DHong", "wate3235", "_defaultRoot_/¬ 
tree.oak.com");
addApp()
Availability
Flash Player 6.
Flash Communication Server MX 1.0.
Usage
addApp(app_name)
Parameters
app_name
  A string that contains the name of the application to be added.
Returns
If the call succeeds, the server sends a reply information object with a 
level
 property of 
status
 and a 
code
 property of 
NetConnection.Call.Success
.
If the call fails, the server sends a reply information object with a 
level
 property of 
error
 
and a 
code
 property of 
NetConnection.Call.BadValue
 or a more specific value, if available. 
Some objects might also have a 
description
 property that contains a string describing the 
cause of the failure.
Description
Adds a new application to the virtual host by creating the required directory for the new 
application in the directory tree. Once the directory for the new application is created, you (or 
another administrator with file system access) can put any required server-side scripts in the 
directory. The client-side code uses the new application directory in the URI parameter of the 
NetConnection.Connect
 call.