Understanding the ActionScript Language > About built-in objects

 

About built-in objects

You can use built-in Flash objects to access and manipulate certain kinds of information. Most built-in objects have methods (functions assigned to an object) that you can call to return a value or perform an action. For example, the Date object returns information from the system clock and the Sound object lets you control sound elements in your movie.

Some built-in objects have properties whose values you can read. For example, the Key object has constant values that represent keys on the keyboard. Each object has its own characteristics and abilities that make it useful in a movie.

The built-in Flash objects are divided into four categories within the Objects folder in the Actions panel: Core, Movie, Client/Server, and Authoring.

The Core objects are also core objects in the ECMA specification on which ActionScript is based. The ActionScript Core objects are Arguments, Array, Boolean, Date, Function, Math, Number, Object, and String.

The Movie objects are specific to ActionScript. They are Accessibility, Button, Capabilities, Color, Key, Mouse, MovieClip, Selection, Sound, Stage, System, TextField, and TextFormat.

The Client/Server objects are ActionScript objects you can use to communicate between a client and a server. They are LoadVars, XML, and XMLSocket.

The Authoring objects are for customizing the Flash authoring application. They are CustomActions and Live Preview.

Movie clip instances are represented as objects in ActionScript; their default object class is MovieClip. To change the class of movie clips, see Creating inheritance. You can call built-in movie clip methods just as you would call the methods of any other ActionScript object.

For detailed information on each object, see its entry in the online ActionScript Dictionary in the Help menu.