EasyManua.ls Logo

MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT - Page 514

MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT
816 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
514 Chapter 12: ActionScript Dictionary
See also
loadMovie()
, loadVariables(), loadVariablesNum(), MovieClip.unloadMovie()
MovieClip.localToGlobal()
Availability
Flash Player 5.
Usage
my_mc.localToGlobal(point)
Parameters
point
The name or identifier of an object created with the Object class, specifying the x and y
coordinates as properties.
Returns
Nothing.
Description
Method; converts the point object from the movie clips (local) coordinates to the Stage
(global) coordinates.
Example
The following example converts x and y coordinates of the point object, from the movie clips
(local) coordinates to the Stage (global) coordinates. The local x and y coordinates are specified
using the
_xmouse and _ymouse properties to retrieve the x and y coordinates of the mouse
pointer 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()

Table of Contents

Related product manuals