
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
354
|
Chapter 13: Movie Clips
4. Choose whether to insert an absolute reference, which begins with _root,orarel-
ative reference, which expresses the reference to the target clip in relation to the
clip that contains your code (
this).
5. If you are exporting to Flash 4 format, choose the Slashes Notation button for
Flash 4 compatibility. (The Dot Notation button, selected by default, composes
references that won’t work in Flash 4).
The Insert Target Path tool cannot generate relative references that ascend a hierar-
chy of clips. That is, the tool cannot be used to refer to a clip that contains the cur-
rent clip (unless you want to begin the path from
_root and proceed downward). To
create references that ascend the clip hierarchy, we must either use absolute refer-
ences starting with
_root (which therefore become descending references) or manu-
ally enter the appropriate relative references in our code using the
_parent property.
Dynamic References to Clip Objects
Normally, we know the name of the specific instance or movie we are manipulating,
but there are times when we’d like to control a clip whose name we don’t know. We
may, for example, want to scale down a whole group of clips using a loop or create a
button that refers to a different clip each time it is clicked. To handle these ...