Configurable application object properties for server-side scripting
83
For example, given the previous XML fragment, the following
trace()
statements are valid:
trace("I am " + application.config.use " and I work in the " +
application.config.dep " department.");
trace("I am " + application.config["user_name"] + " and I work in the " +
application.config["dept_name"] + " department.");
The output from either statement would be as follows:
I am jdoe and I work in the engineering department.
As a second example, assume that the environment variable
COMPUTERNAME
is equal to
"jsmith01"
, and you have defined a symbol named
HELLO
in the substitution.xml file,
as follows:
<Root>
<Symbols>
<HELLO>World</HELLO>
</Symbols>
</Root>
In addition, the following XML appears in the Application.xml file:
<Application>
<JSEngine>
<config>
<foo>${%COMPUTERNAME%}</foo>
<hello>${HELLO}</hello>
</config>
</JSEngine>
</Application>
Then in a server-side script, the following
trace()
statements would be valid:
trace("My computer's name is: " + application.config.foo);
trace("Hello " + application.config.hello);
The output would then be as follows:
My computer's name is: jsmith01
Hello World
NO
T
E
In Flash Media Server 2, the output of
trace()
statements is displayed in the
management console and the application log file.
Summary of Contents for FLASH MEDIA SERVER 2-MANAGING FLASH MEDIA...
Page 1: ...Managing Flash Media Server...
Page 6: ...6 Contents...
Page 10: ...10 About This Manual...