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 Accessibility class.

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 Button class.

Color

The Color class lets you get and set RGB color values for movie clip objects. For more information, see Color class. For an example of using the Color class to change the color of movie clips, see Setting color values.

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 ContextMenu class and ContextMenuItem class.

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 ContextMenu class and ContextMenuItem class.

Key

The Key class provides methods and properties for getting information about the keyboard and keypresses. For more information, see Key class. For an example of capturing keypresses to create an interactive SWF file, see Capturing keypresses.

LocalConnection

The LocalConnection class lets two SWF files running on the same computer communicate. See LocalConnection class.

Mouse

The Mouse class provides control over the mouse in a SWF file; for example, this class lets you hide or show the mouse pointer. For more information, see Mouse class. For an example of using the Mouse class, see Creating a custom mouse pointer.

MovieClip

Every movie clip in a Flash movie is an instance of the MovieClip class. You use the methods and properties of this class to control movie clip objects. See the MovieClip class entry and Working with Movie Clips.

MovieClipLoader

The MovieClipLoader class lets you track the download progress of SWF and JPEG files using an event listener mechanism. See the MovieClipLoader class entry and Preloading SWF and JPEG files.

PrintJob

The PrintJob class lets you print content that is rendered dynamically and multipage documents. See PrintJob class and Using the ActionScript PrintJob class.

Selection

The Selection class lets you get and set text field focus, text field selection spans, and text field insertion points. See Selection class.

SharedObject

The SharedObject class provides local data storage on the client computer. See SharedObject class.

Stage

The Stage class provides information about a SWF file's dimensions, alignment, and scale mode, and reports Stage resize events. See Stage class.

System

The System class provides information about Flash Player and the system on which Flash Player is running (for example, screen resolution and current system language). It also lets you show or hide the Flash Player Settings panel and modify SWF file security settings. See System class.

TextField

The TextField class provides control over dynamic and input text fields. See TextField class and Working with Text.

TextField.StyleSheet

The TextField.StyleSheet class (an "inner class" of the TextField class) lets you create and apply CSS text styles to HTML- or XML-formatted text. See TextField.StyleSheet class and Formatting text with Cascading Style Sheets.

TextFormat

The TextFormat class lets you apply formatting styles to characters or paragraphs in a TextField object. See TextFormat class and Using the TextFormat class.

Media classes

The media classes provide playback control of sound and video in a SWF file, as well as access to the user's microphone and camera, if they are installed. These classes are located in the Built-In Classes > Media subfolder in the Actions toolbox.

Class

Description

Camera

The Camera class provides access to the user's camera, if one is installed. When used with Flash Communication Server MX, your SWF file can capture, broadcast, and record images and video from a user's camera. See Camera class.

Microphone

The Microphone class provides access to the user's microphone, if one is installed. When used with Flash Communication Server MX, your SWF file can broadcast and record audio from a user's microphone. See Microphone class.

NetConnection

The NetConnection class is used to establish a local streaming connection for playing a Flash Video (FLV) file from an HTTP address or from the local file system. For more information, see NetConnection class. For more information on playing FLV files over the Internet, see Playing back external FLV files dynamically.

NetStream

The NetStream class is used to control playback of FLV files. For more information, see NetStream class. For more information on playing FLV files over the Internet, see Playing back external FLV files dynamically.

Sound

The Sound class provides control over sounds in a SWF file. For more information, see Sound class. For an example of using the Sound class to create volume and balance controllers, see Creating sound controls.

Video

The Video class is used to display video objects in a SWF file. See Video class.

Client-server classes

The following table lists classes that let you send and receive data from external sources or communicate with application servers over FTP, HTTP, or HTTPS.

Note: In Flash Player 7, a SWF file can load data only from exactly the same domain from which it was served. For more information, see Flash Player security features and About allowing cross-domain data loading.

These classes are located in the Built-In Classes > Client/Server subfolder in the Actions panel.

Class

Description

LoadVars

The LoadVars class is an alternative to the loadVariables() action for transferring variables between a SWF file and a server in name-value pairs. See the LoadVars class entry and Using the LoadVars class.

XML

The XML class extends the XMLNode class and provides methods, properties, and event handlers for working with XML-formatted data, including loading and parsing external XML, creating new XML documents, and navigating XML document trees. See XML class and Using the XML class.

XMLNode

The XMLNode class represents a single node in an XML document tree. It is the XML class's superclass. See XMLNode class.

XMLSocket

The XMLSocket class lets you create a persistent socket connection with another computer for low-latency data transfer, like that required for real-time chat applications. See XMLSocket class and Using the XMLSocket class.

Authoring classes

The authoring classes are available only in the Flash authoring environment. These classes are found in the Built-In Classes > Authoring subfolder in the Actions toolbox.

Class

Description

CustomActionsg

The CustomActions class lets you manage any custom actions that are registered with the authoring tool. See CustomActions class.

Live Preview

The Live Preview feature (listed under Built-in Classes in the Actions toolbox, though not a class) provides a single function called onUpdate that is used by component developers. See onUpdate.