116 Chapter 6: Using the Built-In Classes
Classes specific to Flash Player
The following tables list the classes that are specific to Flash Player and the Flash runtime model.
These classes are typically split into four categories: movie classes (which provide overall control of
SWF files and Flash Player), media classes (for working with sound and video), client-server
classes (for working with XML and other external data sources), and authoring classes (which
provide control over the Flash authoring environment).
Note: This categorization affects the locations of the classes in the Actions toolbox, but not how you
use the classes.
Movie classes
The movie classes provide control over most visual elements in a SWF file, including movie clips,
text fields, and buttons. The movie classes are located in the Actions toolbox in the Built-in
Classes > Movie subfolder.
Class Description
Accessibility The Accessibility class manages communication between SWF files and
screen reader applications. You use the methods of this class together with
the global
_accProps property to control accessible properties for movie clips,
buttons, and text fields at runtime. See
_accProps and the Accessibility class
entries in Chapter 12, “ActionScript Dictionary,” on page 205.
Button Every button in a SWF file is an instance of the Button class. The Button
class provides methods, properties, and event handlers for working with
buttons. See the Button class entry in Chapter 12, “ActionScript Dictionary,”
on page 205.
Color The Color class lets you get and set RGB color values for movie clip objects.
For more information, see the Color class entry in Chapter 12, “ActionScript
Dictionary,” on page 205. For an example of using the Color class to change
the color of movie clips, see “Setting color values” on page 100.
ContextMenu The ContextMenu class lets you control the contents of the Flash Player
context menu. You can associate separate ContextMenu objects with
MovieClip, Button, or TextField objects by using the
menu property available
to those classes. You can also add custom menu items to a ContextMenu
object by using the ContextMenuItem class. See the ContextMenu class and
ContextMenuItem class entries in Chapter 12, “ActionScript Dictionary,”
on page 205.
ContextMenuItem The ContextMenuItem class lets you create new menu items that appear in
the Flash Player context menu. You add new menu items that you create with
this class to the Flash Player context menu by using the ContextMenu class.
See the ContextMenu class and ContextMenuItem class entries in
Chapter 12, “ActionScript Dictionary,” on page 205.
Key The Key class provides methods and properties for getting information about
the keyboard and keypresses. For more information, see the Key class entry
in Chapter 12, “ActionScript Dictionary,” on page 205. For an example of
capturing keypresses to create an interactive SWF file, see “Capturing
keypresses” on page 96.