User Guide

Tools object 357
tools.activeTool
Availability
Flash MX 2004.
Usage
tools.activeTool
Description
Read-only property; returns the ToolObj object for the currently active tool.
Example
The following example saves an object that represents the currently active tool in the theTool
variable.
var theTool = fl.tools.activeTool;
tools.altIsDown
Availability
Flash MX 2004.
Usage
tools.altIsDown
Description
Read-only property; a Boolean value that identifies if the Alt key is being pressed. The value is
true if the Alt key is pressed, and false otherwise.
tools.constrainPoint()
Availability
Flash MX 2004.
Usage
tools.constrainPoint(pt1, pt2)
Parameters
pt1
and pt2 specify the starting-click point and the drag-to point.
Description
Method; takes two points and returns a new adjusted or constrained point. If the Shift key is
pressed, then the returned point is constrained to follow either a 45
ยบ
constrain (useful for
something such as a line with an arrowhead) or to constrain an object to maintain its aspect ratio
(such as pulling out a perfect square with the rectangle tool).