Flash CS3 Documentation |
|||
| Extending Flash > Objects > Tools object > tools.constrainPoint() | |||
Flash MX 2004.
tools.constrainPoint(pt1, pt2)
pt1 and pt2 Points that specify the starting-click point and the drag-to point.
A new adjusted or constrained point.
Method; takes two points and returns a new adjusted or constrained point. If the Shift key is pressed when the command is run, 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).
The following example returns a constrained point:
pt2 = fl.tools.constrainPoint(pt1, tempPt);
Flash CS3
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/9.0/main/00004571.html