Aligning Elements

I l @ ve RuBoard

As you get into the process of animation, you'll discover how important alignment can be. Flash's grids, its guides, and its Snap features (see Chapter 1) help you align objects on the Stage manually. Flash also offers automatic alignment through the Align panel. You can line up selected objects by their top, bottom, left, or right edges or by their centers (Figure 4.29). You can align the objects to each other or align them to the Stagefor example, placing the top edge of all selected objects at the top edge of the Stage. Flash can also resize one object to match the dimensions of anothermaking them the same width, for example.

Figure 4.29. Flash's Align panel can line up selected objects in various ways. Here are a few alignment choices used on the same set of objects.

graphics/04fig29.gif

To access alignment options:

  • From the Window menu, choose Align, or press graphics/01icon01.gif -K (Mac) or Ctrl-K (Windows) (Figure 4.30).

    Figure 4.30. Choose Window > Align to open the Align panel.

    graphics/04fig30.gif

    The Align panel appears (Figure 4.31).

    Figure 4.31. The Align panel offers options for aligning objects horizontally and vertically, distributing objects evenly in horizontal or vertical space, forcing objects to match each other (or the Stage) in width and height, and creating even spacing between objects.

    graphics/04fig31.gif

    You can apply any of the alignment options to selected objects on the Stage.

To align items horizontally:

  1. On the Stage, select the items that you want to align.

  2. In the Align section of the Align panel (Figure 4.32), choose one of the following options:

    Figure 4.32. You can align objects horizontally by their left edges (A), centers (B), or right edges (C).

    graphics/04fig32.gif

    • Align left edge

    • Align horizontal center

    • Align right edge

      Flash rearranges the selected objects.

To align items vertically:

  1. On the Stage, select the items that you want to align.

  2. In the Align section of the Align panel (Figure 4.33), choose one of the following options:

    Figure 4.33. You can align objects vertically by their top edges (A), centers (B), or bottom edges (C).

    graphics/04fig33.gif

    • Align top edge

    • Align vertical center

    • Align bottom edge

      Flash rearranges the selected objects.

To match dimensions of items:

  1. On the Stage, select the items that you want to change.

  2. In the Match Size section of the Align panel (Figure 4.34), do one of the following:

    Figure 4.34. Choosing the Match Height option in the Match Size section of the Align panel changes all selected items to be the same height. Flash makes shorter items grow to match the tallest selected item.

    graphics/04fig34.gif

    • To expand all items to be the same width as the widest item, choose Match Width.

    • To expand all items to be the same height as the tallest item, choose Match Height.

    • To perform both of the preceding actions, choose Match Width and Height.

To make alignment relative to the Stage:

  • In the Align panel, choose To Stage (Figure 4.35).

    Choosing To Stage in the Align panel makes all your alignment choices relative to the edges of the Stage.

    graphics/04fig35.gif

    Flash makes your alignment choices in the Align, Distribute, and Match Size sections relative to the edges of the Stage. Align Bot om Edge, for example, puts all the bottom edges of the selected elements at the bottom of the Stage. Matching height makes selected elements as tal as the Stage.

graphics/01icon02.gif Tips

  • In addition to aligning items horizontally and vertically, you can create equal horizontal or vertical space among three or more items. The buttons in the Distribute section of the Align panel let you equalize the horizontal space between selected elements' left edges, centers, or right edges or equalize the vertical space between selected items' top edges, centers, or bottom edges.

  • Use the Align panel's Space options to create equal horizontal or vertical space between items' inside edges.

  • You can make a series of alignment adjustments to the same set of elementsfor example, aligning all selected items by their left edges and then equalizing the vertical space between them. You can even use the alignment options to pull all selected items into one corner of the Stage.


I l @ ve RuBoard


Macromedia Flash MX for Windows and Macintosh. Visual QuickStart Guide
Macromedia Flash MX 2004 for Windows and Macintosh (Visual QuickStart Guides)
ISBN: 0582851165
EAN: 2147483647
Year: 2002
Pages: 243

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