When Lines and Fills Interact

I l @ ve RuBoard

Even the invisible outlines that describe painted brush-stroke fills can cut other lines. This means that when you draw lines over fills, you can wind up with lots of little segments.

To see how a fill segments a line:

  1. In the Toolbox, choose the pencil tool.

  2. 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.

  3. On the Stage, draw a line.

  4. Return to the Toolbox, and choose the brush tool.

  5. Click the fill-color box (in the Toolbox or in the Brush Tool Property Inspector), and from the pop-up swatch set, choose red.

  6. On the Stage, paint a brush stroke that intersects your line twice.

    The brush stroke remains one solid object, but the line turns into three separate segments (Figure 4.2).

    Figure 4.2. When a fill overlays a line, the fill segments the line. As the selection highlighting shows, the fill remains one solid object.

    graphics/04fig02.gif

To see how a line segments a fill:

  1. In the Toolbox, choose the brush tool.

  2. Click the fill-color box (in the Toolbox or the Brush Tool Property Inspector), and from the pop-up swatch set, choose red.

  3. On the Stage, paint a brush stroke.

  4. Return to the Toolbox, and choose the pencil tool.

  5. 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.

  6. On the Stage, draw a line that intersects your brush stroke twice.

    The line cuts the brush stroke into three segments; the invisible outline of the brush stroke cuts the line into five separate segments (Figure 4.3).

    Figure 4.3. When a line overlays a fill, the line cuts the fill, and the fill's invisible outline cuts the line.

    graphics/04fig03.gif

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; 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 brush strokes in the same color, the second slightly overlapping the first, the edges of the two brush strokes 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.

I l @ ve RuBoard


Macromedia Flash MX for Windows and Macintosh. Visual QuickStart Guide
Macromedia Flash MX 2004 for Windows and Macintosh (Visual QuickStart Guides)
ISBN: 0582851165
EAN: 2147483647
Year: 2002
Pages: 243

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net