Debugging changes
This section describes changes that improve your ability to debug your scripts.
Output window changed to Output panel
the same way as any other panel in Flash.
Improved error reporting at compile time
handling, ActionScript 2.0 provides a number of new compile-time errors. For more information,
see
Appendix A, "Error Messages," on page
Improved exception handling
commands let you implement more robust exception handling.
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, Flash MX 2004 and
Flash MX Professional 2004 introduce 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.0.
ActionScript 2.0 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
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.0 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 Java. ActionScript 2.0 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.0 also lets you declare the object type of a variable when you
create it (see
"Strict data typing" on page
(see
Appendix A, "Error Messages," on page
The language elements that are new in ActionScript 2.0 are listed below.
•
class
•
extends
•
implements
•
interface
•
dynamic
•
static
•
public
•
private
•
get
•
set
•
import
22
Chapter 1: What's New in Flash MX 2004 ActionScript
The Error class and the
,
, and
extends
implements
You can now move and dock the Output panel in
In addition to providing more robust exception
783.
throw
, ActionScript syntax is now easier to learn for
38) and provides significantly improved compiler errors
783).
and
try..catch..finally
Need help?
Do you have a question about the FLASH MX 2004 - ACTIONSCRIPT and is the answer not in the manual?