beautypg.com

Tools.altisdown, Tools.constrainpoint() – Adobe Extending Flash Professional CS5 User Manual

Page 529

background image

507

EXTENDING FLASH PROFESSIONAL

Tools object

Last updated 5/2/2011

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.

Example
The following example determines whether the Alt key is being pressed:

var isAltDown = fl.tools.altIsDown;

tools.constrainPoint()

Availability
Flash MX 2004.

Usage

tools.constrainPoint(pt1, pt2)

Parameters

pt1, pt2

Points that specify the starting-click point and the drag-to point.

Returns
A new adjusted or constrained point.

This manual is related to the following products: