Max-Mov > MovieClip.getBounds
MovieClip.getBoundsSyntax
anyMovieClip
.getBounds(targetCoordinateSpace
);
Arguments
targetCoordinateSpace
The target path of the Timeline whose coordinate space you want to use as a reference point.
Description
Method; returns the minimum and maximum x and y coordinate values of the MovieClip for the target coordinate space specified in the argument. The return object will contain the properties {xMin, xMax, yMin, yMax}
. Use the localToGlobal
and globalToLocal
methods of the MovieClip object to convert the movie clip's local coordinates to Stage coordinates, or Stage coordinates to local coordinates respectively.
Player
Flash 5 or later.
Example
The following example uses getBounds
to retrieve the bounding box of the myMovieClip
instance in the coordinate space of the main movie:
myMovieClip.getBounds(._root);
See also
MovieClip.globalToLocal
MovieClip.localToGlobal