03.05.2013 Views

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

If you place files in the First Run/Include directory or in the global Include directory, back up these<br />

files. If you ever need to uninstall <strong>and</strong> reinstall Flash, these directories might be deleted <strong>and</strong><br />

overwritten.<br />

Do not place a semicolon (;) at the end of the line that contains the #include directive.<br />

Availability: <strong>ActionScript</strong> 1.0; Flash Player 4.0<br />

Parameters<br />

[path]filename.as:String - filename.asThe filename <strong>and</strong> optional path for the script to<br />

add to the Actions panel or to the current script; .as is the recommended filename extension.<br />

Example<br />

The following examples show various ways of specifying a path for a file to be included in<br />

your script:<br />

// Note that #include statements do not end with a semicolon (;)<br />

// AS file is in same directory as FLA file or script<br />

// or is in the global Include directory or the First Run/Include directory<br />

#include "init_script.as"<br />

// AS file is in a subdirectory of one of the above directories<br />

// The subdirectory is named "FLA_includes"<br />

#include "FLA_includes/init_script.as"<br />

// AS file is in a subdirectory of the script file directory<br />

// The subdirectory is named "SCRIPT_includes"<br />

#include "SCRIPT_includes/init_script.as"<br />

// AS file is in a directory at the same level as one of the above<br />

directories<br />

// AS file is in a directory at the same level as the directory<br />

// that contains the script file<br />

// The directory is named "ALL_includes"<br />

#include "../ALL_includes/init_script.as"<br />

// AS file is specified by an absolute path in Windows<br />

// Note use of forward slashes, not backslashes<br />

#include "C:/Flash_scripts/init_script.as"<br />

// AS file is specified by an absolute path on Macintosh<br />

#include "Mac HD:Flash_scripts:init_script.as"<br />

Compiler Directives 35

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!