MACROMEDIA FLEX-FLEX ACTIONSCRIPT LANGUAGE Reference page 576

Actionscript language reference
Table of Contents

Advertisement

Parameters
targetCoordinateSpace
to use as a reference point.
Returns
An object with the properties
Description
Method; returns properties that are the minimum and maximum x and y coordinate values of the
instance specified by
Note: Use
MovieClip.localToGlobal()
local coordinates to Stage coordinates, or Stage coordinates to local coordinates, respectively.
You can extend the methods and event handlers of the MovieClip class by creating a subclass.
Example
The following example creates a movie clip called
movie clip and uses
the log file.
this.createEmptyMovieClip("square_mc", 1);
square_mc._x = 10;
square_mc._y = 10;
square_mc.beginFill(0xFF0000);
square_mc.moveTo(0, 0);
square_mc.lineTo(100, 0);
square_mc.lineTo(100, 100);
square_mc.lineTo(0, 100);
square_mc.lineTo(0, 0);
square_mc.endFill();
var bounds_obj:Object = square_mc.getBounds(this);
for (var i in bounds_obj) {
trace(i+" --> "+bounds_obj[i]);
}
The following information writes to the log file:
yMax --> 110
yMin --> 10
xMax --> 110
xMin --> 10
See also
MovieClip.globalToLocal(),
576
Chapter 7: ActionScript for Flash
The target path of the Timeline whose coordinate system you want
,
,
xMin
xMax
for the
my_mc
targetCoordinateSpace
and
MovieClip.getBounds()
MovieClip.localToGlobal()
, and
yMin
yMax.
parameter.
MovieClip.globalToLocal()
. The code draws a square for that
square_mc
to write the coordinate values of the instance to
to convert the movie clip's

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLEX-FLEX ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flex

Table of Contents