addApp(appname:String) : Object



Adds a new application to the virtual host you are connected to 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.

A virtual host may have multiple application directories. This application is created in the first application directory specified in the XML configuration file.


Flash Communication Server 1.0.



A String indicating the name of the application to be added.


A String indicating the user name of the administrator.


A String indicating the password of the administrator.



If the call succeeds, the server returns an Object with a level property of status and a code property of NetConnection.Call.Success.

If the call fails, the server returns an Object with a level property of error and a code property of NetConnection.Admin.CommandFailed 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.


The call returns XML with the following structure:

 <result>   <level></level>   <code></code>   <timestamp></timestamp>  </result>

The XML elements contain the same information as the Object properties returned in an RTMP/E call. The XML may contain a description element if available.

Note: The timestamp response over HTTP is formatted differently on Windows (9/23/2007 6:16:40 PM) and Linux (Sun 23 Sep 2007 06:16:40 PM IST).


The following example shows a call to add the ChatApp application to the connected virtual host:

 nc_admin = new NetConnection(); 
 nc_admin.connect("rtmp://localhost:1111/admin", "JLee", "x52z49ab"); 
 nc_admin.call("addApp", new onAddApp(), "ChatApp");

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy