New object-oriented programming model 23
Key facts about ActionScript 2.0 include the following points:
• Scripts that use ActionScript 2.0 to define classes or interfaces must be stored as external script
files, with a single class defined in each script; that is, classes and interfaces cannot be defined
in the Actions panel.
• You can import individual class files implicitly (by storing them in a location specified by
global or document-specific search paths and then using them in a script) or explicitly (by
using the
import command); you can import packages (collections of class files in a directory)
by using wildcards.
• Applications developed with ActionScript 2.0 are supported by Flash Player 6 and later.
Caution: The default publish setting for new files created in Flash MX 2004 is ActionScript 2.0. If
you plan to modify an existing FLA file to use ActionScript 2
.0 syntax, ensure that the FLA file
specifies ActionScript 2
.0 in its publish settings. If it does not, your file will compile incorrectly,
although Flash will not generate compiler errors.
For more information on using ActionScript 2.0 to write object-oriented programs in Flash, see
Chapter 9, “Creating Classes with ActionScript 2.0,” on page 155.