113
CHAPTER 6
Using the Built-In Classes
In addition to the ActionScript core language elements and constructs (for and while loops, for
example) and primitive data types (numbers, strings, and arrays) described earlier (see
“ActionScript Basics” on page 25), ActionScript also provides a number of built-in classes, or
complex data types. These classes provide you with a variety of scripting features and functionality.
Some of these classes are based on the ECMAScript specification and are referred to as core
ActionScript classes. These classes include the Array, Boolean, Date, and Math classes. For more
information, see “Core classes” on page 115.)
The rest of the built-in ActionScript classes are specific to Macromedia Flash and Flash Player
object model. To understand the distinction between core ActionScript classes and those specific
to Flash, consider the distinction between core and client-side JavaScript: just as client-side
JavaScript classes provide control over the client environment (the web browser and web page
content), the classes specific to Flash provide runtime control over the appearance and behavior of
a Flash application.
This chapter introduces the built-in ActionScript classes, describes common tasks you can
perform with these classes, and provides code examples. For an overview of these classes, see
“Overview of built-in classes” on page 115. For an overview of working with classes and objects in
object-oriented programming, see “About classes and instances” on page 114.