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.
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).
nc_admin = new NetConnection(); nc_admin.connect("rtmp://localhost:1111/admin", "JLee", "x52z49ab"); nc_admin.call("addApp", new onAddApp(), "ChatApp");