![]() ![]() ![]() | |
![]() | |
![]() | |
![]() |
Flash Player 5.
my_mc
.getBounds(targetCoordinateSpace
)
targetCoordinateSpace
The target path of the Timeline whose coordinate system you want to use as a reference point.
An object with the properties xMin
, xMax
, yMin
, and yMax.
Method; returns properties that are the minimum and maximum x and y coordinate values of the instance specified by my_mc
for the targetCoordinateSpace
parameter.
Note: Use MovieClip.localToGlobal()
and MovieClip.globalToLocal()
to convert the movie clip's local coordinates to Stage coordinates, or Stage coordinates to local coordinates, respectively.
In the following example, the object that getBounds()
returns is assigned to the identifier clipBounds
. You can then access the values of each property and use them in a script. In this script, another movie clip instance, clip2
, is placed alongside clip
.
clipBounds = clip.getBounds(_root);
clip2._x = clipBounds.xMax;
MovieClip.globalToLocal()
, MovieClip.localToGlobal()
![]() | |
![]() | |
![]() | |
![]() ![]() ![]() |