Flash Media Server |
|||
| Server-Side ActionScript Language Reference > Server-Side ActionScript Language Reference > getGlobal() | |||
Flash Media Server 2.
getGlobal()
None.
Nothing.
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.
The following code gets a reference to the global object:
var global = getGlobal();