Server Management ActionScript Language Reference
Trademarks 1 Step RoboPDF, ActiveEdit, ActiveTest, Authorware, Blue Sky Software, Blue Sky, Breeze, Breezo, Captivate, Central, ColdFusion, Contribute, Database Explorer, Director, Dreamweaver, Fireworks, Flash, FlashCast, FlashHelp, Flash Lite, FlashPaper, Flex, Flex Builder, Fontographer, FreeHand, Generator, HomeSite, JRun, MacRecorder, Macromedia, MXML, RoboEngine, RoboHelp, RoboInfo, RoboPDF, Roundtrip, Roundtrip HTML, Shockwave, SoundEdit, Studio MX, UltraDev, and WebHelp are either registered tradema
Contents Server Management ActionScript Language Reference . . . . . . . . 5 Using the Server Management ActionScript API . . . . . . . . . . . . . . . . . . . 5 Establishing the connection to the server . . . . . . . . . . . . . . . . . . . . . . . . . . 5 A simple application example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Information objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Method summary . . . . . . . . . . . .
getServerStats() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 getServices() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 getSharedObjects() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 getSharedObjectStats(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 getUsers() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Server Management ActionScript Language Reference Macromedia Flash Media Server includes a set of advanced methods, the Server Management ActionScript application programming interface (API), that lets you extend the management console or make your own administration and monitoring tools by creating Macromedia Flash applications. This document describes the Server Management ActionScript API. For information about ActionScript, see the ActionScript 2.0 Language Reference.
When the administration server host to which you want to connect is a virtual host (one of several services on the same machine), make sure to specify the virtual host’s domain name, or IP Address, as part of the URI—for example, rtmp://www.myVhost.com/admin:1111. That way, when you connect to the host machine, you connect to an instance of the server running on your specified virtual host. Only valid administrators, as defined in the Users.xml configuration file, can connect to the server.
A simple application example This section contains the code for a simple Flash application that calls the getAppStats method. You can copy and paste this code into Flash to see how a simple call works.
{ if (arguments.length < 2) { trace("ERROR! you need to supply a text object to output to"); return; } if (arguments.length < 3) tabLevel = 0; for (var prop in obj) { for (var i = 0; i < tabLevel; i++) // insert requested # of tab characters destination.text += "\t"; destination.text += prop + " = " + obj[prop] + newline; if (typeof (obj[prop]) == "object") { // recursively call printObj printObj(obj[prop], destination, tabLevel+1 ); } } } // Alerts you if there are errors connecting to the server.nc.
Information objects All Server Management ActionScript API methods return data in an information object with the following properties: level, code, timestamp, data, description, and details. All information objects have level, code, and timestamp properties. Some methods have the data property, which contains return data (often in an object or array), and the description and details properties, which typically provide information about errors.
Some methods are available only to server administrators, as indicated by an asterisk (*) in the description of each method; virtual host administrators cannot use these methods. In some cases, virtual administrators can use a method with restrictions; these restrictions are described in the dictionary entry for the method. N OT E Parameters in square brackets ([]) are optional; all other parameters are required.
Method Description getLiveStreamStats() Returns detailed information about a live stream. getMsgCacheStats() Returns server TCMessage cache statistics. getNetStreams() Returns a list of all network streams that are currently connected to the application. getNetStreamStats() Returns detailed information about a specific network stream. getRecordedStreamStats() Returns detailed information about a recorded stream.
Commands for managing the server The following table lists the methods you can use to manage the server. Method Brief description addAdmin() Adds an administrator to the system.* addApp() Adds a new application. addVHostAlias() Adds an alias to a virtual host. changePswd() Changes the password for an administrator in the system. gc() Forces garbage collection of server resources.* reloadApp() Unloads an instance of an application if it is loaded, and then reloads the instance.
addAdmin() Availability ■ Flash Player 6. ■ Flash Communication Server MX 1.0. Usage addAdmin(admin_name, password [,scope]) Parameters admin_name A string that contains the user name of the administrator being added. Password of that administrator. The password is encoded before it is written to the Server.xml configuration file. password scope Optional; string that specifies whether the administrator is a server administrator or a virtual host administrator, and for which virtual host.
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.
Example The following example shows a call to add the ChatApp application to the connected virtual host: nc = new NetConnection(); nc.connect("rtmp://localhost:1111/admin", "JLee", "x52z49ab"); nc.call("addApp", new onAddApp(), "ChatApp"); addVHostAlias() Availability ■ Flash Player 6. ■ Flash Media Server 2. Usage addVHostAlias(VHostName, AliasName, PersistValue) Parameters VHostName A string indicating the virtual host to which to add an alias.
approveDebugSession() Availability ■ Flash Player 6. ■ Flash Media Server 2. Usage approveDebugSession(appInst, PIN) Parameters appInst A string indicating the application and instance name that has a pending debug connection to approve. PIN A number indicating the debug session Personal Identification Number. Each debug connection issues a debug number when queueing to connect to an application. This same number is included on this API.
The following is an example of a Debug approval request: nc_admin.call("approveDebugSession", null, appName/instName", 1234); changePswd() Availability ■ Flash Player 6. ■ Flash Communication Server MX 1.0. Usage changePswd(admin_name, password [, scope]) Parameters A string that contains the name of the administrator whose password is being admin_name changed. password A string that contains that administrator’s new password.
Example /* Change password for server administrator named "ASilva" to "cbx5978y" */ nc.call("changePswd", new onChangePswd(), "ASilva", "cbx5978y", "server"); /* Change password for virtual host administrator named "JLee" to "kbat3786" */ nc.call("changePswd", new onChangePswd(), "JLee", "kbat3786"); /* Change password for virtual host administrator "JLee" to "kbat3786" on */ /* virtual host "tree.oak.com" */ nc.call("changePswd", new onChangePswd(), "JLee", "kbat3786", "_defaultRoot_/¬ tree.oak.
getActiveInstances() Availability ■ Flash Player 6. ■ Flash Communication Server MX 1.0. Usage getActiveInstances([processID]) Parameters processID A number; the process identifier of a Flash Media Server core process. This parameter is optional. Returns If the call succeeds, the server sends a reply information object with a level property of status, a code property of NetConnection.Call.
Returns If the call succeeds, the server sends a reply information object with a level property of status, a code property of NetConnection.Call.Success, and a data property that is an array of strings containing the names of all the adaptors. Description Returns an array of adaptors that are defined. You must be a server administrator to perform this command. getAdminContext() Availability ■ Flash Player 6. ■ Flash Communication Server MX 1.0.
Description Gets the administrative context for an administrator, including information about the specified user’s administrative permissions, the name of the adaptor and virtual host to which the user is connected, and whether the user is currently connected to Flash Media Server. getAdmins() Availability ■ Flash Player 6. ■ Flash Media Server 2. Usage getAdmins(adaptorName) Parameters adaptorName Alternate adaptor, other than _defaultRoot_, on which to find vhost administrators.
getApps() Availability ■ Flash Player 6. ■ Flash Communication Server MX 1.0. Usage getApps() Parameters None. Returns If the call succeeds, the server sends a reply information object with a level property of status, a code property of NetConnection.Call.Success, and a data property that is an array of strings containing the names of all the applications that are installed.
Returns If the call succeeds, the server sends a reply information object with a level property of status, a code property of NetConnection.Call.Success, and a data property that is an object. The data object has the following properties: Property Description accepted Number; total number of connection attempts accepted by this application. bytes_in Number; total number of bytes read by this application. bytes_out Number; total number of bytes written by this application.
Property Description total_instances_unloaded Number; total number of instances that have been unloaded since the application started. up_time Number; time, in seconds, the application has been running. If the call fails, the server sends a reply information object with a level property of error and a code property of NetConnection.Call.Failed 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.
Flash Media Server has four server configuration files: Server.xml, Adaptor.xml, Vhost.xml, and Application.xml. Depending on your permissions, you can get configuration keys for all these files, as described in the following list: ■ For the Server.xml file, specify Admin or Server as the first subkey. All subsequent keys correspond to tags that are relative to the Admin or Server tag in the Server.xml file. You must be a server administrator to view configuration keys in the Server tag.
Returns If the call succeeds, the server sends a reply information object with a level property of status, a code property of NetConnection.Call.Success, and a data property that is an XML string for the specified tag. If the call fails (that is, if the specified configuration key isn’t found), the server returns an empty string. Description This API has been deprecated; use getConfig2() instead. Gets information for the specified configuration key in a specified configuration file.
// Find key in Vhost.xml. key = "Adaptor:_defaultRoot_/VirtualHost:_defaultVhost_/RecordAccessLog"; nc.call("getConfig", new onGetConfig(), key, "/"); // Find key in Application.xml for an application on the virtual host you // connected to when you logged on to the administration server. // Note that the previous subkeys and the second parameter "/" are not necessary. key = "Application:FinanceApp/RecordAppLog"; nc.call("getConfig", new onGetConfig(), key); // Find key in Application.
Flash Media Server has six server configuration files: Server.xml, Users.xml, Logger.xml, Adaptor.xml, Vhost.xml, and Application.xml. Depending on your permissions, you can get configuration keys for all these files, as described in the following list: ■ "/" specifies Server.xml. ■ "Users" specifies Users.xml for server administrators. ■ "Logger" specifies Logger.xml. ■ "Adaptor:" specifies Adaptor.xml. The is the name of the adaptor.
Description Gets information for the specified configuration key in a specified configuration file. Flash Media Server has six server configuration files: Server.xml, Users.xml, Logger.xml, Adaptor.xml, Vhost.xml, and Application.xml. Virtual host administrators can view configuration keys in the Vhost.xml file and Application.xml files for their own virtual hosts. You must be a server administrator to view most of the configuration keys for the Server.xml and Adaptor.xml files.
tSocket.call("getConfig2", new onGetConfig(), key, scope); // return the whole Vhost.xml key = ""; scope = "Adaptor:_defaultRoot_/VHost:_defaultVHost_"; tSocket.call("getConfig2", new onGetConfig(), key, scope); See also getAdminContext(), setConfig2() getGroupMembers() Availability ■ Flash Player 6. ■ Flash Media Server 2.
getGroupStats() Availability ■ Flash Player 6. ■ Flash Media Server 2. Usage getGroupStats(app_instance, groupNumber) Parameters A string that contains the name of the instance of the application on which the group resides, in the form application_name/instance_name. You must specify both the application name and the instance name, separated by a slash (/), even if you want performance statistics for the default instance of the application.
Property Description stream_ids Array; an array of numbers (stream IDs). members_count Number; the number of clients multiplexing on this group connection. Description Gets statistics for a particular group connection. This connection is special because it multiplexes for more than one connection and contains a unique statistic called members_count. Group connections are established from one server to another as proxies.
Description Returns a list of the group connections for a particular application instance. Groups are multiplexed connections from a remote edge server to an origin server. Each group connection represents at least one individual connection to another Flash Media Server server that is acting as proxy for this server. See also getGroupMembers(), getGroupStats() getInstanceStats() Availability ■ Flash Player 6. ■ Flash Communication Server MX 1.0.
Property Description msg_dropped Number; total number of messages dropped by this instance of the application. bytes_in Number; total number of bytes read by this instance of the application. bytes_out Number; total number of bytes written by this instance of the application. accepted Number; total number of connection attempts accepted by this application. rejected Number; total number of connection attempts rejected by this application.
If the call fails, the server sends a reply information object with a level property of error and a code property of NetConnection.Call.Failed 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 Gets the performance data for a specified instance of an application. If you only need information about the performance of a specific script, use the getScriptStats method.
Property Description connected Number; number of currently active socket connections to the adaptor. total_connects Number; total number of socket connections to the adaptor since the adaptor was started. total_disconnects Number; total number of socket disconnections from the adaptor. msg_dropped Number; total number of messages dropped. tunnel_bytes_in Number; tunneling header bytes in (this is the overhead over and above RTMP payload).
getLicenseInfo() Availability ■ Flash Player 6. ■ Flash Communication Server MX 1.0. Usage getLicenseInfo() Parameters None. Returns If the call succeeds, the server sends a reply information object with a level property of status, a code property of NetConnection.Call.Success, and a data property that is an object. The data object has the following properties: Property Description name String; product name, for example, Flash Media Server. version String; version number, for example, 1.0.
Property Description max_connections Number; maximum number of socket connections allowed, which is determined by license family. If you have more than one license, this number is the sum of the max_connections values of all your licenses. max_adaptors Number; maximum number of adaptors (network cards) that you can configure for the server, which is determined by license family. If the license family is Personal, the value of max_adaptors is 1.
Description Retrieves complete license information including information on the maximum bandwidth and maximum number of connections, adaptors, virtual hosts, and CPUs that are allowed by the license. License information for all your licenses is first summarized, followed by specific information about each license. getLiveStreams() Availability ■ Flash Player 6. ■ Flash Communication Server MX 1.0.
getLiveStreamStats() Availability ■ Flash Player 6. ■ Flash Communication Server MX 1.0. Usage getLiveStreamStats(app_instance, stream_name) Parameters A string that contains the name of the instance of the application, in the form application_name/instance_name. app_instance stream_name A string that contains the name of the stream. Returns If the call succeeds, the server sends a reply information object with a level property of status, a code property of NetConnection.Call.
Description Returns detailed information about a live stream. See also getLiveStreams() getMsgCacheStats() Availability ■ Flash Player 6. ■ Flash Communication Server MX 1.0. Usage getMsgCacheStats() Parameters None. Returns If the call succeeds, the server sends a reply information object with a level property of status, a code property of NetConnection.Call.Success, and a data property that is an object.
getNetStreams() Availability ■ Flash Player 6. ■ Flash Communication Server MX 1.0. Usage getNetStreams(app_instance) Parameters A string that contains the name of the instance of the application, in the form application_name/instance_name. app_instance Returns If the call succeeds, the server sends a reply information object with a level property of status, a code property of NetConnection.Call.Success, and a data property that is an array of numbers.
Parameters A string that contains the name of the instance of the application, in the form application_name/instance_name. app_instance A number that represents the ID of the network stream or an array of numbers that represents the network stream ID. netstream_ID To get information for all the network streams that are currently connected, specify a value of -1 for the netstream_ID parameter.
getRecordedStreams() Availability ■ Flash Player 6. ■ Flash Media Server 2. Usage getRecordedStreams(app_name) Parameters A string that contains the name of the application or instance of the application, in the form application_name[/instance_name]. app_name Returns If the call succeeds, the server sends a reply information object with a level property of status, a code property of NetConnection.Call.Success, and a data property that is an array of all the recorded stream names.
getRecordedStreamStats() Availability ■ Flash Player 6. ■ Flash Media Server 2. Usage getRecordedStreamStats(app_instance, stream_name) Parameters A string that contains the name of the instance of the application, in the form application_name/instance_name. app_instance stream_name A string that contains the name of the stream. If the stream has a non-default virtual key or type, these items should be encoded into the stream name.
getScriptStats() Availability ■ Flash Player 6. ■ Flash Communication Server MX 1.0. Usage getScriptStats(app_instance) Parameters A string that contains the name of the instance of the application, in the form application_name/instance_name. app_instance Returns If the call succeeds, the server sends a reply information object with a level property of status, a code property of NetConnection.Call.Success, and a data property that is an object.
getServerStats() Availability ■ Flash Player 6. ■ Flash Communication Server MX 1.0. Usage getServerStats() Parameters None. Returns If the call succeeds, the server sends a reply information object with a level property of status, a code property of NetConnection.Call.Success, and a data property that is an object. The data object has the following properties: Property Description launchTime ActionScript Date object; time the server was started.
Property Description memory_Usage Number. On Microsoft Windows NT 4.0, the approximate percentage of the last 1000 pages of physical memory in use. On Windows 2000 or Windows XP, the approximate percentage of total physical memory in use. cpu_Usage Number; approximate percentage of CPU in use by the Flash Media Server processes—not by the entire system. If the call fails, the server sends a reply information object with a level property of error and a code property of NetConnection.Call.
Description Returns an array containing the names of all the services currently connected to Flash Media Server. Special applications may connect and offer themselves as services to the Flash Media Server. These connections can currently only come through the Java or C SDK for Flash Media Server, as normal connections cannot register as a service. Each application may request the use of these services, and the requested service will offer itself to the application.
See also getSharedObjectStats() getSharedObjectStats() Availability ■ Flash Player 6. ■ Flash Communication Server MX 1.0. Usage getSharedObjectStats(app_instance, object_name, persistence) Parameters A string that contains the name of the instance of the application, in the form application_name/instance_name. app_instance A string that contains the name of the shared object. You can get the names of all active shared objects by using the getSharedObjects command.
If the call fails, the server sends a reply information object with a level property of error and a code property of NetConnection.Call.Failed 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 Gets detailed information about a shared object. See also getSharedObjects() getUsers() Availability ■ Flash Player 6. ■ Flash Communication Server MX 1.0.
See also getUserStats() getUserStats() Availability ■ Flash Player 6. ■ Flash Communication Server MX 1.0. Usage getUserStats(app_instance, user_ID) Parameters A string that contains the name of the instance of the application, in the form application_name/instance_name. app_instance A string that contains the user ID, as assigned by the server. You can retrieve a user ID with the getUsers command.
Property Description protocol String; protocol used by the client to connect to the server ("rtmp", "rtmpt" or "rtmps".) stream_ids Array of numbers that represent the stream IDs. If the call fails, the server sends a reply information object with a level property of error and a code property of NetConnection.Call.Failed 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 Returns an array of vhosts defined for the specified adaptor. You must be a server administrator to perform this command. getVHostStats() Availability ■ Flash Player 6. ■ Flash Communication Server MX 1.0. Usage getVHostStats([adaptorName, vhostName]) Parameters Optional string that contains the user name of the adaptor. If not specified, it is assumed to be "_defaultRoot_". adaptorName Optional string that contains the user name of the virtual host.
Property Description total_disconnects Number; total number of disconnections from the server. total_instances_loaded Number; total number of instances that have been loaded. This property does not represent the total number of active instances loaded. To get the number of active instances loaded, subtract the value of total_instances_unloaded from total_instances_loaded. total_instances_unloaded Number; total number of instances that have been unloaded.
ping() Availability ■ Flash Player 6. ■ Flash Communication Server MX 1.0. Usage ping() Parameters None. Returns If the call succeeds, the server sends a reply information object with a level property of status, a code property of NetConnection.Call.Success, and a timestamp property that is a Date object. The Date object indicates the time that the command was executed. If the call fails, the server sends a reply information object with a level property of error and a code property of NetConnection.
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.Admin.Command.Failed 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.
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.Admin.Command.Failed 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.
Parameters A string that contains the name of the application or instance of the application you want to remove, in the form application_name[/instance_name]. app_name 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.Admin.Command.
Usage removeVHostAlias(VHostName, AliasName) Parameters VHostName A string indicating the virtual host from which to remove an alias. AliasName A string indicating the alias name to remove from the specified vhost. 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. Description Removes an alias from a virtual host.
If the call fails, the server sends a reply information object with a level property of error and a code property of NetConnection.Admin.Command.Failed 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 Restarts a virtual host that is currently running.
setConfig() Availability ■ Flash Player 6. ■ Flash Communication Server MX 1.0. Usage setConfig(key, key_value, [,scope]) Parameters key A string that specifies the configuration key for which you want to change the value. A key is specified as a list of subkeys delimited by slashes (/). The first subkey specifies the XML configuration file that contains the desired configuration key.
■ For the Application.xml file of an application that is running on the same virtual host to which you connected when you logged on to the administration server, specify as the first subkey Application:app_name, where app_name is the name of the application. To get a key in the Application.xml file for an application that is running on a different virtual host, specify the full key: Adaptor:adaptor_name/VirtualHost:vhost_name/ Application:app_name.
You must be a server administrator to change the values of most configuration keys in the Server.xml and Adaptor.xml files. For a description of the XML configuration files, see Managing Flash Media Server. TI P It is possible to have more than one XML tag with the same name at the same level in the XML tree. In the configuration file, you should distinguish such tags by using a name attribute in the XML tag (for example, if you have more than one virtual host: PAGE 65val = "true"; nc.call("setConfig", new onSetConfig(), key, val); // Change key in Application.xml for a different virtual host. // The adaptor and virtual host names and the second parameter are necessary. key = "Adaptor:_defaultRoot_/VirtualHost:www.redpin.com/ Application:ChatApp/ ¬ RecordAppLog"; val = "true"; nc.call("setConfig', new onSetConfig(), key, val, "/"); See also getAdminContext(), getConfig() setConfig2() Availability ■ Flash Player 6. ■ Flash Media Server 2.
String; specifies the value to set for the tag specified by the key parameter. If the value specified is a simple string, it is set as the tag data for the specified tag. If the value is valid XML, for example, bar, the XML is added as a child tag to the specified tag. If the value is an empty string, the specified tag is removed. scope ■ "/" specifies Server.xml. You must have server administrator privileges to access most parts of this file.
Description Changes the value of the specified configuration key in a specified configuration file. Flash Media Server has six server configuration files: Server.xml, Users.xml, Logger.xml, Adaptor.xml, Vhost.xml, and Application.xml. Virtual host administrators can change the values of configuration keys in the Vhost.xml file and Application.xml files for their own virtual hosts. You must be a server administrator to change the values of most configuration keys in the Server.xml and Adaptor.xml files.
// add child tag to a tag in default Application.xml key = "Process"; val = "inst"; scope = "Adaptor:_defaultRoot_/VHost:_defaultVHost_/App"; tSocket.call("setConfig2", new onSetConfig(), key, val, scope); // delete tag in default Application.xml key = "Process"; val = ""; scope = "Adaptor:_defaultRoot_/VHost:_defaultVHost_/App"; tSocket.call("setConfig2", new onSetConfig(), key, val, scope); See also getAdminContext(), getConfig2() startServer() Availability ■ Flash Player 6.
Description Starts the Flash Media Server service or stops it and restarts it. You must be a server administrator to perform this operation. See also stopServer() startVHost() Availability ■ Flash Player 6. ■ Flash Communication Server MX 1.0. Usage startVHost(vhost_name) Parameters vhost_name A string that contains the name of the virtual host you want to start or the new virtual host you want to enable, in the form [adaptor/]vhost.
Example The following example starts a virtual host named diamond.world.com on the currently connected adaptor and then starts a virtual host named diamond.world.com on the gem adaptor. /* Starts a virtual host named diamond.world.com */ nc.call("startVHost", new onStartVHost(), "diamond.world.com"); /* Starts a virtual host named diamond.world.com on the adaptor, gem */ nc.call("startVHost", new onStartVHost(), "gem/diamond.world.
Description Shuts down the Flash Media Server. If you use this command while users are connected, you should take steps to notify users of an imminent server shutdown so that they do not lose their work. You must be a server administrator to perform this operation. See also startServer() stopVHost() Availability ■ Flash Player 6. ■ Flash Communication Server MX 1.0. Usage stopVHost([vhost_name]) Parameters vhost_name Optional; string that contains the virtual host that you want to stop.
Example The following example stops the virtual host tree.oak.com and then stops the virtual host tree.oak.com on the default adaptor. /* Stop the vhost named tree.oak.com */ nc.call("stopVHost", new onStopVHost(), "tree.oak.com"); /* Stop the vhost named tree.oak.com on the default adaptor */ nc.call("stopVHost", new onStopVHost(), "_defaultRoot_/tree.oak.com"); See also restartVHost(), startVHost() unloadApp() Availability ■ Flash Player 6. ■ Flash Communication Server MX 1.0.
Description Shuts down all instances of the specified application or instance of an application. If an application name is specified, all instances of the application are shut down and all the users who are connected to any instance of the application are immediately disconnected. If an instance of an application is specified, only that instance is shut down, and all the users who are connected to that instance are immediately disconnected.
Server Management ActionScript Language Reference