O'Reilly logo

ActionScript: The Definitive Guide by Colin Moock

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

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

Availability

Flash 3 and later

Constructor

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

Properties

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required