Top-level classes

The top level contains the ActionScript classes and global functions, many of which provide core functionality for your applications. Core classes, borrowed directly from ECMAScript, include Array, Boolean, Date, Error, Function, Math, Number, Object, String, and System. To find more information on each class, see the following table.

NOTE

The CustomActions and XMLUI classes are available only in the Flash authoring environment.

Class

Description

Accessibility

The Accessibility class manages communication between SWF files and screen reader applications. You use the methods of this class with the global _accProps property to control accessible properties for movie clips, buttons, and text fields at runtime. See Accessibility.

Array

The Array class represents arrays in ActionScript and all array objects are instances of this class. The Array class contains methods and properties for working with array objects. See Array.

AsBroadcaster

Provides event notification and listener management capabilities that can be added to other objects. See AsBroadcaster.

Boolean

The Boolean class is a wrapper for Boolean (true or false) values. See Boolean.>.

Button

The Button class provides methods, properties, and event handlers for working with buttons. See Button. Note that the built-in Button class is different from the Button component class, associated with the version 2 component, Button.

Camera

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

Color

The Color class lets you set the RGB color value and color transform of movie clip instances and retrieve those values after you set them. The Color class is deprecated in Flash Player 8 in favor of the ColorTransform class. For information on color transforms, see ColorTransform (flash.geom.ColorTransform).

ContextMenu

The ContextMenu class lets you control the contents of the Flash Player context menu at runtime. 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.

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 ContextMenuItem.

CustomActions

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

Date

The Date class shows how dates and times are represented in ActionScript, and it supports operations for manipulating dates and times. The Date class also provides the means for obtaining the current date and time from the operating system. See Date.

Error

The Error class contains information about runtime errors that occur in your scripts. You typically use the throw statement to generate an error condition, which you can handle using a try..catch..finally statement. See Error.

Function

The Function class is the class representation of all ActionScript functions, including those native to ActionScript and those that you define. See Function.

Key

The Key class provides methods and properties for getting information about the keyboard and key presses. See Key.

LoadVars

The LoadVars class lets you transfer variables between a SWF file and a server in name-value pairs. See LoadVars.

LocalConnection

The LocalConnection class lets you develop SWF files that send instructions to each other without using the fscommand() method or JavaScript. See LocalConnection.

Math

The Math class provides convenient access to common mathematical constants and provides several common mathematical functions. All the properties and methods of the Math class are static and must be called with the syntax Math.method(parameter) or Math.constant. See Math.

Microphone

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

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. See Mouse.

MovieClip

Every movie clip in a SWF file is an instance of the MovieClip class. You use the methods and properties of this class to control movie clip objects. See MovieClip.

MovieClipLoader

This class lets you implement listener callbacks that provide status information while SWF, JPEG, GIF, and PNG files load into movie clip instances. See MovieClipLoader.

NetConnection

The NetConnection class establishes a local streaming connection for playing a Flash Video (FLV) file from an HTTP address or from the local file system. See NetConnection.

NetStream

The NetStream class controls playback of FLV files from a local file system or HTTP address. See NetStream.

Number

The Number class is a wrapper for the primitive number data type. See Number.

Object

The Object class is at the root of the ActionScript class hierarchy; all other classes inherit its methods and properties. See Object.

PrintJob

The PrintJob class lets you print content from a SWF file, including content that is rendered dynamically, and multipage documents. See PrintJob.

Selection

The Selection class lets you set and control the text field in which the insertion point is located (the text field that has focus). See Selection.

SharedObject

The SharedObject class offers persistent local data storage on the client computer, similar to cookies. This class offers real-time data sharing between objects on the client's computer. See SharedObject.

Sound

The Sound class provides control over sounds in a SWF file. See Sound.

Stage

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

String

The String class is a wrapper for the string primitive data type, which lets you use the methods and properties of the String object to manipulate primitive string value types. See String.

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.

TextField

The TextField class provides control over dynamic and input text fields, such as retrieving formatting information, invoking event handlers, and changing properties such as alpha or background color. See TextField.

TextFormat

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

TextSnapshot

The TextSnapshot object lets you access and lay out static text inside a movie clip. See TextSnapshot.

Video

The Video class lets you show video objects in a SWF file. You can use this class with Flash Media Server to display live streaming video in a SWF file, or within Flash to display a Flash Video (FLV) file. See Video.

XML

This class contains methods and properties for working with XML objects. See XML.

XMLNode

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

XMLSocket

The XMLSocket class lets you create a persistent socket connection between a server computer and client running Flash Player. Client sockets enable low-latency data transfer, such as that which is required for real-time chat applications. See XMLSocket.

XMLUI

The XMLUI object enables communication with SWF files that are used as a custom user interface for the Flash authoring tool's extensibility features (such as Behaviors, Commands, Effects, and Tools). See XMLUI.