Built-in Movie Clip Properties

Unlike generic objects of the Object class, which have few built-in properties, each movie clip comes equipped with a slew of built-in properties. These properties describe, and can be used to modify, the clip’s physical features. They are fundamental tools in the ActionScript programmer’s toolkit.

All built-in movie clip property names begin with an underscore, which sets them apart from user-defined or custom properties. Built-in properties take the format:

_ property

Built-in property names should be written in lowercase. However, because identifiers are case insensitive in ActionScript, it is possible—though not good form—to capitalize property names.

We’re not going to go into heavy descriptions of the built-in properties right now; that information is listed in Part III. However, to get us thinking about properties and what they offer, Table 13.1 provides a list of the built-in movie clip properties and basic descriptions of their functions.

Table 13-1. The Built-in Movie Clip Properties

Property Name

Property Description

_alpha

Transparency level

_currentframe

Position of the playhead

_droptarget

Path to the clip or movie on which a dragged clip was dropped

_framesloaded

Number of frames downloaded

_height

Physical height, in pixels (of instance, not original symbol)

_name

Clip’s identifier, returned as a string

_ parent

Object reference to the timeline containing this clip

_rotation

Angle of rotation ...

Get ActionScript: The Definitive Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.