Accessibility

TechNote (Archived)

Server-side ActionScript Naming and Search Path

When a Macromedia Flash Communication Server application is loaded, the server will check for the presence of a Server-Side Communications ActionScript file. This file can be any of 4 names, and can either be in the application directory, or in a sub-directory there of named "scripts." Frequently, the name "main.asc" is used, although there are good reasons why a different name might be used. One reason to use a name besides "main.asc", is to keep the file names unique, and distinguishable from each other. This is especially helpful when editing multiple .asc at once in an editor such asMacromedia Dreamweaver MX. For this reason, using <application_name>.asc is a good idea.One can also use the .js file extension.

Search order for server-side ActionScript files:
1 main.asc - located in the<appName>/scripts directory
2

main.asc - located in the <appName> directory

3 main.js - located in the<appName>/scripts directory
4 main.js - located in the <appName> directory
5 <application_name>.asc - located in the <appName>/scripts directory
6 <application_name>.asc - located in the <appName> directory
7 <application_name>.js - located in the <appName>/scripts directory
8 <application_name>.js - located in the <appName> directory

In the above paths, <appName> refers to the individual directory for the application. For a Developer installation, the default location for all <appName> directories is C:\inetpub\wwwroot\flashcom\applications\<appName> and for the Production installation, the default location is
C:\Program Files\Macromedia\Flash Communication Server\flashcom\applications\<appName>.
Similarly,"<appName>/scripts" refers to a scripts directory that can be created within the <appName> directory.

Additionally loaded ActionScript files
It is possible to load additional Server-Side ActionScript files by using a load() command:

load("logic.asc" );

FlashCom will first look for "logic.asc" in the same directory where the initial ActionScript (main.asc,<application_name>.asc, etc) file was found. Then it will look in any directories defined within the <ScriptLibPath> tag of Application.xml (C:\Program Files\Macromedia\Flash Communication Server MX\conf\_defaultRoot_\_defaultVHost_\Application.xml). By default, the tag has one entry, which is the scriptlib directory. For the Developer install it is:

 <ScriptLibPath>C:\inetpub\wwwroot\flashcom\scriptlib</ScriptLibPath> 

and for the Production install it is:

 <ScriptLibPath>C:\Program Files\Macromedia\Flash Communication Server MX\flashcom\scriptlib</ScriptLibPath> 

Multiple directories can be defined in the<ScriptLibPath> tag by using a semicolon delimited list of directory paths.



AlertThis content requires Flash

To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.

Download the free Flash Player now!

Get Adobe Flash Player

Creative Commons License

Search Support


Document Details

ID:tn_16518

Products Affected: