To specify an absolute path for the AS file, use the format supported by your platform (Macintosh
or Windows). See the following example section. (This usage is not recommended because it
requires the directory structure to be the same on any computer that you use to compile
the script.)
Note: If you place files in the First Run/Include directory or in the global Include directory, back up
these files. If you ever need to uninstall and reinstall Flash, these directories might be deleted and
overwritten.
Example
The following examples show various ways of specifying a path for a file to be included in
your script:
// Note that #include statements do not end with a semicolon (;)
// AS file is in same directory as FLA file or script
// or is in the global Include directory or the First Run/Include directory
#include "init_script.as"
// AS file is in a subdirectory of one of the above directories
// The subdirectory is named "FLA_includes"
#include "FLA_includes/init_script.as"
// AS file is in a directory at the same level as one of the above directories
// The directory is named "ALL_includes"
#include "../ALL_includes/init_script.as"
// AS file is specified by an absolute path in Windows
// Note use of forward slashes, not backslashes
#include "C:/Flash_scripts/init_script.as"
// AS file is specified by an absolute path on Macintosh
#include "Mac HD:Flash_scripts:init_script.as"
See also
import
#include
331
Need help?
Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?