Recipe 1.30. Scaling Elements


Problem

You want to resize an existing element.

Solution

Use the Free Transform tool (Q) or choose Modify Transform Scale. Optionally, you can select the Modify Transform Scale and Rotate option to scale by a percentage.

Discussion

Flash's Free Transform tool performs a variety of transformations, including scale, stretch, distort, perspective, rotate, and reposition. Selecting the tool puts you in Free Transform mode, where you can perform most of the preceding operations. Alternatively, you can choose Scale from the Modify Transform menu, which limits the Free Transform tool to scaling alone. You can also specify the type of transformation using the desired modifier in the Options section of the Tools panel while the Free Transform tool is active.

If you activate the Free Transform tool by selecting it directly from the Tools panel, you can scale elements as follows:

  • Drag a corner handle to scale both horizontally and vertically. Before you drag, make sure that the cursor is a diagonal double-headed arrow, which indicates scale mode. To enforce proportional scaling, hold down the Shift key as you drag.

  • To change the width of an element, drag a side handle, looking for the horizontal double-headed arrow cursor before dragging.

  • To change the height of an element, drag a handle on the top or bottom, looking for a vertical double-headed arrow cursor before dragging.

If you initiate scaling using the main menu's Modify Transform Scale command, the behavior is the same as described in the preceding list, except that proportions are automatically constrained when you drag a corner handle.

If scaling visually isn't accurate enough, you can also scale numerically. To scale an element with numeric precision, choose Modify Transform Scale and Rotate. In the Scale and Rotate dialog box, enter the scale percent (and rotation degree) and click OK.

To scale to a given value, rather than percentage, you can set the W and H (width and height) values for a selected element using the Property inspector.

See Also

Recipe 1.31, Recipe 1.32




Flash 8 Cookbook
Flash 8 Cookbook (Cookbooks (OReilly))
ISBN: 0596102402
EAN: 2147483647
Year: 2007
Pages: 336
Authors: Joey Lott

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net