• 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 Toolbox, choose the pencil tool.

In the Pencil Tool Property Inspector, do the following:

  • Set the stroke style to Solid.

  • Set the stroke height to 4 points.

  • Set the color to blue.

On the Stage, draw a line.

Click the stroke-color box (in the Toolbox or in the Property Inspector), and from the pop-up swatch set, choose a new color, such as red.

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.

The Mystery of the Stacking Order for Strokes

When drawing one line on top of another, you might expect that the last line drawn would wind up on top, but sometimes, that’s not the case. In this exercise about intersecting lines, for example, if you start with a red line and then draw a blue line across it, you’ll see that the blue line jumps behind the red one when you release the mouse button.

Flash creates a stacking order for lines based on the hex-color value of the line’s stroke-color setting. The higher the hex value of the stroke color, the higher the line sits in a stack of lines drawn on the Stage. A line whose stroke color is set to a hex value of 663399 always winds up on top of a stroke whose color is set to 333399.

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