# New object-oriented programming model

The ActionScript language has grown and developed since its introduction several years ago. With each new release of Flash, additional keywords, objects, methods, and other language elements have been added to the language. However, unlike earlier releases of Flash, Matador introduces several new language elements that implement object-oriented programming in a more standard way than before. Because these language elements represent a significant enhancement to the core ActionScript language, they represent a new version of ActionScript itself—ActionScript 2.

ActionScript 2 is not a new language. Rather, it comprises a core set of language elements that make it easier to develop object-oriented programs. With the introduction of keywords such as class, interface, extends, implements, and others, ActionScript syntax is now easier to learn for programmers familiar with other languages. New programmers can learn more standard terminology that they can apply to other object-oriented languages they may study in the future.

ActionScript 2 supports all the standard elements of the ActionScript language; it simply enables you to write scripts that more closely adhere to standards used in other object-oriented languages, such as JavaScript and Java. ActionScript 2 should be of interest primarily to intermediate or advanced Flash developers who are building applications that require the implementation of classes and subclasses. ActionScript 2 also supports strong data typing and significantly improved compiler errors.

The language elements that are new in ActionScript 2 are listed below.

- class
- extends
- implements
- interface
- dynamic
- static
- public
- private
- get
- set
- import

The following list summarizes some key facts about ActionScript 2.

- Applications developed with ActionScript 2 are supported by Flash Player 6 and later.
- Scripts that use ActionScript 2 language elements must be stored as external script files, with a single class defined in each script; that is, ActionScript 2 terminology is not supported in the Actions panel. (The one exception is import, which is supported in the Actions panel.)