86
Server-Side ActionScript Language Reference
getGlobal()
Availability
Flash Media Server 2.
Usage
getGlobal()
Parameters
None.
Returns
Nothing.
Description
Method (global); provides access to the global object while the secure.asc file is loading. Use
the global object to manipulate built-in global functions. To prevent inadvertent access to the
global object, always hold its reference in a temporary variable (declared by
var
); do not hold
its reference in a member variable or global variable. This function can only be used in the
secure.asc file.
Flash Media Server 2 has two script execution modes: secure and normal. In secure mode,
only the secure.asc file (if it exists) is loaded and evaluated—no other application scripts are
loaded. Also, the global
getGlobal()
and
protectObject()
functions are only available in
secure mode. These are very powerful because they provide complete access to the script
execution environment and let you create system objects. Once the secure.asc file is loaded,
the server switches to normal script execution mode until the application is unloaded.
Use the
getGlobal()
function to create protected system calls. For more information, see
“Implementing secure system objects” in
Developing Media Applications
.
Example
The following code gets a reference to the global object:
var global = getGlobal();
See also
protectObject()
Содержание FLASH MEDIA SERVER 2
Страница 1: ...Server Side ActionScript Language Reference...
Страница 4: ...4 Contents...
Страница 228: ...228 Server Side ActionScript Language Reference...
Страница 234: ...234 Server Side Information Objects...