Example
The following example uses a
application.clients
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
configuration file. For more information, see "Configurable application object properties for
server-side scripting" in Managing Flash Media Server.
Example
Use the following sample
Application.config
<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.dept_name + " 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.
24
Server-Side ActionScript Language Reference
loop to iterate through each member of the
for
array and calls the method
ApplicationObject
<ApplicationObject>
example:
on each client:
serverUpdate
tag in the Application.xml
tag in the Application.xml file for this
Need help?
Do you have a question about the FLASH MEDIA SERVER 2-SERVER-SIDE ACTIONSCRIPT LANGUAGE and is the answer not in the manual?