Server-Side Communication ActionScript > load

 

load

Availability

Flash Communication Server MX.

Usage

load(filename);

Parameters

filename The relative path to an ActionScript file in relation to the main.asc file.

Returns

Nothing.

Description

Method (global); loads an ActionScript file inside the main.asc file. This method executes only when the ActionScript file is first loaded. The loaded file is compiled and executed after the main.asc file is successfully loaded, compiled, and executed, and before application.onAppStart is executed. The path of the specified file is resolved relative to main.asc. This method is useful for loading ActionScript libraries.

Note: For security reasons, your server-side applications directory, which contains ASC files, audio/video FLV files, and ActionScript FLA source files, should not be accessible to a user browsing your website.

Example

The following example loads the myLoadedFile.as file:

load("myLoadedFile.as");