Max-Mov > MovieClip.localToGlobal
MovieClip.localToGlobalSyntax
anyMovieClip
.localToGlobal(
point
);
Arguments
point
The name or identifier of an object created with the Object object, specifying the x and y coordinates as properties.
Description
Method; converts the point
object from the movie clip's (local) coordinates, to Stage (global) coordinates.
Player
Flash 5 or later.
Example
The following example converts x and y coordinates of the point
object, from the movie clip's coordinates (local) to the Stage coordinates (global). The local x and y coordinates are specified using xmouse
and ymouse
to retrieve the x and y
coordinates of the mouse position.
onClipEvent(mouseMove) {
point = new object();
point.x = _xmouse;
point.y = _ymouse;
_root.out3 = point.x + " === " + point.y;
_root.out = _root._xmouse + " === " + _root._ymouse;
localToGlobal(point);
_root.out2 = point.x + " === " + point.y;
updateAfterEvent();
}
See also
MovieClip.globalToLocal