|
Flash design tutorial ZONE
Use Rulers
Flash has another useful tool that you can use to align objects in your movies: rulers. When you choose View | Rulers, Flash displays a vertical and a horizontal ruler, as shown in Figure 2-5. The rulers use the unit of measure you specified in the Document Properties dialog box. If you did not modify the Ruler Units option when you set up the movie, the rulers use pixels, the Flash default, as their unit of measure. When you select an object on the stage and move it, Flash displays two small lines on each ruler that correspond to the object’s width and height. As you move an object across the stage, these reference points follow, giving you a preview of the object’s current position. You can use these reference points to accurately position an object on the stage. Rulers are also used to create guides for your document.
Use Guides
Another option you can use to align and position objects in your movies is the guides feature.
Guides are visual references that you create and position where needed. You use guides to align
elements in much the same way you use a grid. Unlike grids, however, guides can be positioned
horizontally and vertically wherever you want them on the stage. Guides (and grids, by the way)
will not be visible when the movie is published. To create guides for your document, you must
first make the rulers visible by choosing View | Rulers. The guides are accessed through the rulers.
To create a vertical guide, click the vertical ruler and drag to the right. As you drag, a small
vertical line appears (on the horizontal ruler), giving you a preview of the vertical guide’s
position. When the guide is in the desired position, release the mouse button, and Flash will
create a lime-green vertical guide.
To create a horizontal guide, click the horizontal ruler and drag down. As you drag, a small
horizontal line appears on the vertical ruler, indicating the current position of the guide. When
the guide is in the desired position, release the mouse button. The following illustration shows
vertical and horizontal guides added to a document.
To toggle the visibility of guides, choose View | Guides | Show Guides. When you choose
this command, Flash hides all visible guides from view. Select the command again and Flash will
reveal the hidden guides.
Use the Snap to Guides
Feature
After you create a series of guides, you can have Flash snap objects to the guides by choosing
View | Snapping | Snap to Guides. After you choose this option, Flash will snap objects to guides
as you drag the objects across the stage. The snapping takes place at the handle you chose when
you selected the object. For example, if you select the object by its center, snapping will occur
when the center of the object approaches a guide. If you select the object by one of its corners,
snapping will occur when the corner approaches a guide. As mentioned previously, the object’s
handle (an unfilled dot) becomes darker and slightly larger when it approaches a guide that it can
snap to.
When you use the Snap To Guides feature, it’s a good idea to disable snapping to the
grid. If you have both options enabled at the same time, Flash will have so many targets
to snap to that it will be difficult to ascertain when Flash is snapping an object to the
grid or to a guide.
Move Guides
After you have created a guide, you can easily move it. As you near a vertical guide, a small
arrow appears to the right of the cursor. Click the guide to select it, and then drag it to the desired
position. Likewise, as you near a horizontal guide, a small downward-pointing arrow appears to
the right of the cursor. Click the guide to select it and drag it to the desired position.
Lock Guides
When you have a series of guides positioned just the way you want them, you can lock them to
prevent inadvertently selecting and moving a guide when you meant to select an object. To have
Flash lock all guides used in your document, choose View | Guides | Lock Guides.
Edit Guides
You can edit guides after you create them. You can change the color of guides and modify the
snapping accuracy Flash employs when you align objects to the guides. Choose View | Guides |
Edit Guides and Flash will open the Guides dialog box, shown next. In this dialog box, you can
change the color of a guide and the accuracy level for guide snapping.
To get rid of all the guide settings, select View | Guides | Clear Guides. This will clear
all settings and guides from the stage. Alternately, you can drag guides back toward the
rulers to get them off the stage.
Snap Elements on the Stage
As discussed previously, the Snap To Grid and Snap To Guides features can help you align
elements to grids or guidelines. In addition, there are three snapping options in Flash 8 that
relate to the snapping of elements in relation to one another. For multiple objects that need to be
aligned quickly, these snapping options can be useful:
■ Snap Align Snap Align makes aligning adjacent objects very easy.
Turn on Snap Align by selecting View | Snapping | Snap Align. When
this feature is turned on and you drag one object near another, horizontal
and vertical dashed lines cross each other on the edge of the object
nearest the other object, as shown in this illustration.
The Snap Align lines change position in real time as you move
the object. Use this feature if you prefer to align with the help of a
visual cue. You can change the properties of the Snap Align feature by
selecting View | Snapping | Edit Snap Align. In the Snap Align dialog
box, you can customize the snap tolerance of objects. The default tolerance for this
feature is 10 pixels.
■ Snap To Pixels This feature allows you to snap objects to their nearest pixel. To
activate this feature, go to View | Snapping | Snap to Pixels.
■ Snap To Objects Snap To Objects allows you to snap the edge of one object
to the edge of another. This feature can be activated in one of two ways: from
the menu (View | Snapping | Snap to Objects) or from the magnet icon in the
Options section of the Toolbar (shown here) when the Arrow tool is selected.
There are many other ways to control the alignment of objects on the stage and in relation to
one another. These additional features will begin to unfold as you learn more about Flash.
|