MovieClip “Class” — class-like datatype for main movies and movie clips


Flash 3 and later


None. Movie clip symbols are created manually in the Flash authoring tool. Movie clip instances can be created with attachMovie( ) and duplicateMovieClip( ).


Movie clip properties provide descriptions of, and control over, various physical features of movie clips and main movies. Properties are accessed using the dot operator, as with any object. See Section 13.1 in Chapter 13, for details on using movie clip properties.

Two property-related issues to note:

  • Changing a physical property of a MovieClip object places that clip under programmatic control, breaking the internal timeline’s hold on it. This halts any tween currently in progress.

  • Some MovieClip properties appear to be floating-point numbers but are mapped to other formats internally. The _alpha property, for example, is mapped to an integer between 0 and 255 internally. This results in a loss of precision between setting and retrieving values of certain properties. We may, for example, set a property value to 90 and then immediately retrieve the value back as 89.84375. If minor variations in property values make a difference to a script, we must manually round those values using Math.round( ), Math.floor( ), or Math.ceil( ) after retrieval, or we must store the original value in a variable separate from the property.

Table 20.9 lists the movie clip properties. Note that all built-in movie clip properties ...

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

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.