targetPath( ) Global Function | Flash 5 |
the absolute path to a movie or movie clip |
A reference to a movie clip object.
A string representing the path to movieClip in absolute terms, using dot notation (e.g., "_level0.myMovie").
The targetPath( ) function returns a movie clip's reference as a string that describes the absolute path to the clip (identical to the return value of MovieClip.valueOf( )). The targetPath( ) function sometimes is used to compose placement-sensitive code that operates on a movie clip, relative to the timeline upon which the clip resides. To retrieve the slash-notation path to a movie clip (rather than targetPath( )'s dot notation), use MovieClip._target.
If square is a movie clip contained by shapes, which resides on the main timeline of _level0, then inside the shapes clip, the statement:
targetPath(square);
returns:
"_level0.shapes.square"
MovieClip._target, MovieClip.valueOf( ); "The targetPath( ) function," in Chapter 13