Table of Contents

targetPath( ) Global Function Flash 5

the absolute path to a movie or movie clip
targetPath (movieClip)

Arguments

movieClip

A reference to a movie clip object.

Returns

A string representing the path to movieClip in absolute terms, using dot notation (e.g., "_level0.myMovie").

Description

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.

Example

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"

See Also

MovieClip._target, MovieClip.valueOf( ); "The targetPath( ) function," in Chapter 13


Table of Contents