- When Lines Intersect Lines
- When Lines and Fills Interact
- When Shapes Interact
- Understanding Grouping
- Working with Grouped Elements
- Controlling the Stacking Order
- Editing Groups
- Aligning Elements
- Using the Complex Paint Modes with the Brush
- Applying Gradients to Multipart Shapes
- Using the Eraser Tool with Multiple Shapes
Using the Complex Paint Modes with the Brush
In Chapter 3, you learned about using the brush in Normal mode, in which every stroke with the brush lays down a new fill. As you saw earlier in this chapter, when brush strokes overlap, they interact. Flash offers four special brush modes that restrict the way the new brush strokes interact with existing editable lines (strokes) and fills. These special modes make it much easier to work with complex graphics made of multiple fills and lines. You can set the brush to paint over lines without affecting them (the fill winds up behind the lines instead of covering them), to paint only in blank areas of the Stage (existing lines and fills repel the paint), to paint only within a selection (if the brush slips outside the selection, nothing happens), or to paint only within the area where you started your brush stroke (all other areas repel the paint).
To leave lines intact when painting:
Create several shapes on the Stage. Use both lines and fills and a variety of colors.
In the Toolbox, select the brush tool.
Click the fill-color box (in the Toolbox or in the Brush Tool Property Inspector); from the pop-up swatch set, choose a color you haven't used in creating the fills and lines on the Stage.
Testing the brush modes in a new color makes it easy to see what's happening.
From the Brush Mode menu, choose Paint Fills (Figure 4.36).
Figure 4.36 The Brush Mode menu lets you choose the way new brushstrokes interact with existing fills and strokes.
Start painting; paint over blank areas of the Stage as well as over the items you created.
When you release the mouse button, Flash creates the new fill without affecting any lines you may have overlapped. These temporarily obscured lines reappear (Figure 4.37).
Figure 4.37 When you paint with the brush tool set to Paint Fills, Flash lets you paint over lines without affecting them. Lines pop to the front of the image when you release the mouse button.
To leave existing lines and fills intact when painting:
With a variety of lines and fills already on the Stage, select the brush tool in the Toolbox.
From the Brush Mode menu, choose Paint Behind.
Start painting; paint over blank areas of the Stage as well as over the elements you created.
When you release the mouse button, Flash creates the fill only in blank areas of the Stage (Figure 4.38).
Figure 4.38 When you paint with the brush set to Paint Behind, Flash lets you paint over lines and fills without affecting them. Existing lines and fills pop to the front of the image when you release the mouse button.
The term Paint Behind is a bit misleading. You do not actually create fills that lie behind other fills. Rather, Flash allows existing lines and fills to repel, or cut away, any overlapping portions of the new fill you're creating. When you release the mouse button after painting a new fill, that fill appears to sink down behind the other fills on the Stage. When you use this mode, be sure to remember that any existing lines and fills will segment the new fill you create.
To restrict paint to selected fills:
With a variety of lines and fills already on the Stage, select one or more of the fills but leave some fills unselected.
In the Toolbox, select the brush.
From the Brush Mode menu, choose Paint Selection.
Start painting; paint over blank areas of the Stage as well as over the elements you've created.
When you release the mouse button, Flash creates the fill only in areas of the Stage you had highlighted as a selection. Your new brushstroke has no effect on selected lines or on lines and fills that lie outside the selection (Figure 4.39).
Figure 4.39 When you paint with the brush set to Paint Selection, Flash ignores any brushstrokes you make outside the selection. In this mode, you cannot affect lines, and any unselected fills you accidentally paint over reappear when you release the mouse button.
How Can You Tell What You're Painting?
Flash cannot accurately preview the fills you create in complex paint modes the way it can in Normal mode. In complex modes, as you hold down the mouse button and paint in one continuous brush stroke, Flash displays your new fill in a temporary form. This temporary fill lies on top of every object it overlaps on the Stage and obscures any fills and lines that lie beneath it. When you release the mouse button, Flash calculates and redraws the new fill according to the paint mode you've selected in the Toolbox.
To restrict paint to one area:
With a variety of lines and fills already on the Stage, in the Toolbox, select the brush tool.
From the Brush Mode menu, choose Paint Inside.
Start painting from within one shape, extending your brush strokes to paint outside the shape where you began. When you release the mouse button, Flash creates the fill only inside the shape where you first clicked with the brush to begin painting (Figure 4.40).
Figure 4.40 When you paint with the brush set to Paint Inside, Flash confines the creation of new brush strokes to the area where you started painting. Painting over lines has no effect, and if your brush slips outside the area in which you started, Flash simply ignores it.