Drawing Precisely in Flash
If drawing in Flash seems too loosey-goosey to you, you need to know about a few features that can help you draw more precisely. Other programs do offer more precise tools, but Flash may have the tools you need.
The ruler rules
To help you get your bearings, you can choose View --> Rulers to display the Flash ruler along the top and the left side of the Stage.
To give yourself more room to work while you create drawing objects on the Stage, you can hide the Timeline by choosing View --> Timeline. Do the same to display the Timeline again when you need to work with layers or start animating your work.
By default, the ruler is measured in pixels. Computer screens are measured by how many pixels they display horizontally and vertically. Pixels are useful for Web site work because Web browsers work with only this unit. A pixel, however, is not a fixed physical size because it depends on the resolution capacity and settings of your screen. You may find it easier to think in inches or millimeters.
You can set the ruler to the unit of measurement that is most helpful to you. Choose Modify --> Document to open the Document Properties dialog box. From the Ruler Units drop-down list, choose one of the units (pixels, inches, points, centimeters, or millimeters) and click OK.
When the ruler is displayed, lines appear on both the top and side rulers whenever you drag an object — either while creating it or editing it. For example, as you drag to create a square, you see a line on each ruler telling you where you started and where you end up. If you're moving the square, Flash displays two lines on each ruler indicating the outside dimensions of the square. You can easily move the square one inch to the left by looking at the lines on the top ruler.
Guides are a new feature in Flash 5 to help you lay out the Stage more precisely. Guides are horizontal and vertical lines you can use as drawing aids while you work. Don't worry — guides never appear in the published Flash Player file. To use the guides, you must display the rulers, as described in the preceding section. To display guides, choose View --> Guides --> Show Guides. But that action simply turns on the guides feature; you still don't see anything!
To display the guides, you need to drag them from the rulers. Drag from the left ruler to create a vertical guide, and drag from the top ruler to create a horizontal guide.
Working with the grid
You can display a grid on the Stage to help you draw more accurately and to gauge distances. The grid exists only to guide you and never appears when the movie is printed or published on a Web site. Simply displaying the grid doesn't constrain your objects to points on the grid. Use the grid by itself when you want a visual guide for sizing, moving, and laying out the Stage.
To display the grid, choose View --> Grid --> Show Grid. Use the same command to hide the grid again. You can set the size of the grid squares. Choose View --> Grid --> Edit Grid to open the Grid dialog box. You can also change the color of the grid lines here.
You can change the units of measurement used for the grid by choosing Modify --> Document. In the Modify Document dialog box, choose the unit you want from the Ruler Units drop-down list and click OK.
When you want even more precision, you can turn on snapping. Snapping tells Flash to snap objects to the intersections on the grid or to other objects. Usually, you want the grid on when you use snapping so that you can see the snap points.
To turn on snapping, choose the Arrow tool and click the Snap modifier in the Options section of the Drawing toolbox or Choose View --> Snap to Objects. To snap to the grid, choose View --> Grid --> Snap to Grid. You can use either method to turn snapping off again.
Snapping pulls your cursor to the grid points and to existing objects as you work. You can take advantage of snapping both while drawing new objects and editing existing objects. When you have snapping on and select an object, Flash displays a small, black circle and snaps that circle to the grid points.
Setting snap-to-grid preferences
You can get downright picky about how Flash snaps to grid points. Do you want the end of a line (for example) to always snap or only if it is close to a grid point or existing object? To set your preferences, choose View --> Grid --> Edit Grid. From the Snap Accuracy drop-down list, choose one of the options between Must be Close and Always Snap.
Setting snap-to-objects preferences
Because snapping applies to objects as well as grid points, you can separately set how Flash snaps to objects. Choose Edit --> Preferences and click the Editing tab. Under Drawing Settings, click the Connect Lines drop-down list. Choose from Must be Close, Normal, and Can be Distant. Although Flash calls this the Connect Lines setting, it affects rectangles and ovals as well as lines drawn with the Line and Pencil tools.
This setting also affects how Flash recognizes horizontal and vertical lines and makes them perfectly horizontal or vertical. For example, the Can be Distant setting adjusts a more angled line than the Must be Close setting.
Here's the new news in Flash MX: If the grid isn't precise enough, you can now snap to pixels. Choose View --> Snap to Pixels to toggle snapping to pixels on and off. If Snap to Pixels is on, when you zoom in to 400 percent or higher, Flash automatically displays the pixel grid. With Snap to Pixels on, all objects you create or move snap to the pixel grid.
When Snap to Pixels is on, you can press the C key to temporarily turn off pixel snapping. In the same situation, you can press the X key to temporarily hide the pixel grid.