User Guide

22 Chapter 1: What’s New in Flash MX 2004 ActionScript
interface
dynamic
static
public
private
get
set
import
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 10, “Creating Custom Classes with ActionScript 2.0,” on page 247.
Although using ActionScript 2.0 is recommended, you can continue to use ActionScript 1 syntax,
especially if you are doing more traditional Flash work such as simple animation that doesnt
require user interaction.