Setting Stroke Attributes

I l @ ve RuBoard

A line has three attributes: color , thickness (also known as weight or, in Flash, stroke height ), and style. You can set all three in the Property Inspector for any tool that creates or modifies strokes (the line, pen, oval, rectangle, and ink- bottle tools). In addition, you can set stroke color from the Toolbox or from the Color Mixer panel.

To access the Property Inspector:

  • If the Property Inspector is not open , from the Window menu, choose Properties (Figure 2.4).

    Figure 2.4. Choose Window > Properties (top) to display the Property Inspector (bottom).

    graphics/02fig04.gif

    The Property Inspector appears on the desktop. Note that the Property Inspector displays the attributes for lines only when you have selected a line-related tool in the Toolbox or you have selected lines on the Stage. (You learn to use line- related tools in the following exercises; you learn to use the Property Inspector with selections in Chapter 3.)

To set stroke color via the Property Inspector:

  1. With the Property Inspector open, choose the line tool.

    The Line Tool Property Inspector appears, showing the current settings for the three attributes for strokes.

  2. In the Property Inspector, click the stroke-color box.

    The pointer changes to an eyedropper, and a set of swatches appears (Figure 2.5).

    Figure 2.5. Clicking the stroke-color box in the Property Inspector opens a set of color swatches and provides the eyedropper tool for selecting a new color.

    graphics/02fig05.gif

  3. To select a color, do one of the following:

    • To select the color directly below the tip of the eyedropper, with the eyedropper tool, click a swatch or an item on the Stage.

    • In the hexadecimal-color field, enter a value.

graphics/01icon02.gif Tips

  • You can also set stroke color in the Color Mixer panel. Choose Window > Color Mixer to open the Color Mixer panel, click the stroke-color box, and select a color as described in step 3 of the preceding exercise.

  • You can set stroke color without opening any panels. In the Toolbox, with any tool selected, click the stroke-color box. The eyedropper tool and a set of swatches appear (Figure 2.6). Select a color; Flash updates all the stroke-color boxes, and tools that create strokes will use that color.

    Figure 2.6. Click the stroke-color box in the Toolbox to open a set of color swatches similar to those available in the Property Inspector.

    graphics/02fig06.gif

  • The trio of small buttons at the bottom of the Colors section of the Toolbox allows you to set the stroke color (and fill color) to black, white, or none quickly. To set stroke color to black (and fill color to white), with the stroke-color box selected, click the leftmost button of the trio: the Black and White button. Click the rightmost button to make the current stroke and fill colors change places. (The middle button lets you set fill or stroke to no color when you use the oval and rectangle tools, which you'll learn about later in this chapter.)

    The selected color appears in the stroke-color box in the Property Inspector, the Color Mixers, and the Toolbox. Flash uses that color to create lines when you use the line tool or any other tool that creates strokes.


To set a line weight:

  1. With the Property Inspector open, select the line tool.

    You can also select one of the other tools that work with strokes, pencil, pen, oval, rectangle, and ink bottle. You'll learn to use the pencil, pen, oval, and rectangle tools later in this chapter, the ink bottle, in Chapter 3.

  2. In the Line Tool Property Inspector's stroke-height field, enter a number between 0.25 and 10 (Figure 2.7).

    Figure 2.7. Entering a new value in the stroke-height field sets the thickness for strokes created by tools that draw strokes.

    graphics/02fig07.gif

    Flash uses that stroke height to create lines when you use the line tool or any other tool that creates strokes.

graphics/01icon02.gif Tips

  • For easy entry of line weights, click the triangle to the right of the stroke-height field. A slider pops open. Drag the slider's lever to choose a value between 0.25 and 10 points. Click elsewhere in the panel window or on the Stage to close the slider and apply the new line weight.

  • For even quicker changes, just drag the slider triangle. When you release the slider's lever, Flash applies the new weight immediately.


To select a line style:

  1. In the Line Tool Property Inspector, click the Stroke Style pop-up menu (Figure 2.8).

    Figure 2.8. Choose a line style from the pop-up menu in the Property Inspector.

    graphics/02fig08.gif

    A list of seven styles ( hairline , solid, dashed, dotted , ragged, stippled, and hatched) appears.

  2. Select a style.

    A graphic representation of that style appears in the stroke-style menu. Flash now applies that style to any new lines you create.

graphics/01icon02.gif Tip

  • In Flash, the hairline setting is considered to be a line style, not a line weight. (Use the Stroke Style pop-up menu to get the hairline setting.) In symbols, hairlines do not change thickness when you resize the symbol. Other lines in symbols grow thicker or thinner as you scale them up or down. (To learn about symbols, see Chapter 6.)


You can modify line stylescreating, for example, a custom dotted line with lots of space between dots or a stippled line with a highly random pattern.

To customize a line style:

  1. In the Line Tool Property Inspector, click the Custom button (Figure 2.9).

    Figure 2.9. Click the Custom button in the Property Inspector to access the Stroke Style dialog box.

    graphics/02fig09.gif

    The Stroke Style dialog box appears.

  2. From the Type menu, choose a style for example, Dotted.

    The parameters appropriate to the currently selected stroke style appear in the dialog box (Figure 2.10).

    Figure 2.10. The Stroke Style dialog box contains a pop-up menu for selecting the type of line you want to customize. The dialog box shown here is for dotted lines.

    graphics/02fig10.gif

  3. In the Dot Spacing box, enter a number between 1 and 20.

    This value specifies the amount of space (in points) that appears between the dots in the dotted line.

  4. To select a thickness value, do one of the following:

    • Enter a value from 1 to 10 in the Thickness field.

    • Choose a value from the pop-up menu.

  5. If you want Flash to place a dot at the tip of each corner when you draw a line, choose Sharp Corners.

  6. Click OK.

    A preview of your custom dotted-line style appears in the Stroke Style menu in the Property Inspector. Any tools that create strokes are now set to use that style.

graphics/01icon02.gif Tips

  • Custom stroke-style settings remain in effect until you customize that style again or quit Flash. Define a custom dashed line that has really long dashes, and you'll get the same long dashes the next time you choose the dashed line from the Stroke Style menu in the Property Inspector.

  • Changing the stroke height doesn't affect any other custom settings you've applied. If you want to use your customized long dashes with a thinner line, just enter a new stroke-height value directly in the Property Inspector; you don't need to choose Custom and go back to the Line Style dialog box.


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