
24
Server-Side ActionScript Language Reference
Example
The following example uses a
for
loop to iterate through each member of the
application.clients
array and calls the method
serverUpdate
on each client:
for (i = 0; i < application.clients.length; i++){
application.clients[i].call("serverUpdate");
}
Application.config
Availability
Flash Media Server 2.
Usage
application.config
Description
Property; lets you access properties of the
ApplicationObject
tag in the Application.xml
configuration file. For more information, see “Configurable application object properties for
server-side scripting” in
Managing Flash Media Server
.
Example
Use the following sample
<ApplicationObject>
tag in the Application.xml file for this
Application.config
example:
<Application>
<JSEngine>
<ApplicationObject>
<config>
<user_name>jdoe</user_name>
<dept_name>engineering</dept_name> <config>
</ApplicationObject>
</JSEngine>
</Application>
Either of the following lines of code access the same Application properties defined in the
previous Application.xml file example:
trace("I am " + application.config.user + " and I work in the " +
application.config.dep " department.");
trace("I am " + application.config["user"] + " and I work in the " +
application.config["dept_name"] + " department.");
The following code is sent to the application log file and Application inspector:
I am jdoe and I work in the engineering department.