Tools.shiftisdown, Tools.snappoint() – Adobe Extending Flash Professional CS4 User Manual
Page 527

505
EXTENDING FLASH CS4 PROFESSIONAL
Tools object
Description
Method; sets the pointer to a specified appearance.
Example
The following example sets the pointer to a black arrow.
fl.tools.setCursor(1);
tools.shiftIsDown
Availability
Flash MX 2004.
Usage
tools.shiftIsDown
Description
Read-only property; a Boolean value that is
true
if the Shift key is pressed;
false
otherwise.
Example
The following example determines whether the Shift key is being pressed.
var isShiftDown = fl.tools.shiftIsDown;
tools.snapPoint()
Availability
Flash MX 2004.
Usage
tools.snapPoint(pt)
Parameters
pt
Specifies the location of the point for which you want to return a snap point.
Returns
A new point that may be adjusted or snapped to the nearest geometric object.
Description
Method; takes a point as input and returns a new point that may be adjusted or snapped to the nearest geometric object.
If snapping is disabled in the View menu in the Flash user interface, the point returned is the original point.
Example
The following example returns a new point that may be snapped to the nearest geometric object.
var theSnapPoint = fl.tools.snapPoint(pt1);