• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Chapter 4. Complex Graphics on a Single Layer > When Lines Intersect Lines

When Lines Intersect Lines

If you draw several lines on the same layer, they interact. Draw a new line across an existing one, and the new line cuts—or, in Flash terminology, segments—the old. Segmentation happens whether the lines are the same color or different colors, but it's easiest to see with contrasting colors.

To see how one line segments another:

In the Stroke panel, do the following:

  • Set the line style to Solid.

  • Set the line weight to 4 points.

  • Set the color to red.

In the Toolbox, choose the pencil tool.

On the Stage, draw a line.

Click the stroke-color box (in the Toolbox or in the Stroke panel), and from the pop-up swatch set, choose a new color.

On the Stage, draw a second line; make it intersect your first line at least once.

Flash segments the line. To see the segments, select various parts of the line with the arrow tool (Figure 4.1).

Figure 4.1. When you draw one line across another, every intersection creates a separate segment.

How Do Flash's Editable Objects Interact?

You can think of each frame in a Flash movie as being a stack of transparent acetate sheets. In Flash terms, each "sheet" is a layer. Objects on different layers have a depth relationship: Objects on higher layers block your view of those on lower layers, just as a drawing on the top sheet of acetate would obscure drawings on lower sheets.

Imagine that you have two layers in your movie. If you draw a little yellow square on the bottom layer and then switch to the top layer and draw a big red square directly over the yellow one, the little square remains intact. You simply can't see it while the big red square on the top layer is in the way.

On a single layer, however, objects actually interact with one another, almost as though you were painting with wet finger paint. When fills of different colors interact, the newer fill replaces the older one. Take the preceding example: First draw a little yellow square, and then switch colors and draw a big red square right on top of the little one in the same layer. The little square disappears for good. The red fill replaces the yellow wherever it overlaps the latter.

If the new fill only intersects the old, it still replaces the part where the two overlap. Imagine, for example, using the brush tool to paint the first stroke of the letter X. Now pick up a different color to paint the second stroke of the X. Where the second brush stroke overlaps the first, it eats up that first fill color. You wind up with separate segments of the first stroke on either side of the second stroke where the two intersect.

When fills are the same color, the newer fill simply adds to the shape. If you lay down two brushstrokes in the same color, the second slightly overlapping the first, the edges of the two brushstrokes run together, and you wind up with one wide shape. If you paint both halves of the letter X with the same color, you wind up with a single X-shape object.

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint