Recipe 1.9. Creating Effects with Strokes


Problem

You want to add effects to a line, such as expanding it or softening its edges.

Solution

Use the Convert Lines to Fills command, and then manipulate the resulting fill.

Discussion

Lines and fills each have unique capabilities. Lines are best for creating complex designs, closed or open. However, fills enable special effects, such as bitmap fills. In addition, shapes can be expanded and have their edges softened.

Flash provides different tools to create these kinds of effects. For example, the Brush tool is the most direct way to paint fills. But if you don't have a graphics tablet, it is very hard to draw well with the mouse and the Brush tool.

You can get the best of both worldsthe precision of working with lines and the visual effects available with shapesby converting lines to fills.

To convert lines to fills, follow these steps:

  1. Draw the line. Any of the line drawing tools will work: Pencil, Pen, or Line tools.

  2. When you are satisfied with the overall shape, convert the stroke to a fill by choosing Modify Shape Convert Lines to Fills. At the end of this step, the shape looks the same on stage as it did before, but it is a fill and you can start treating it as such.

  3. Shape Expand Fill. In the dialog box that appears, choose the number of pixels that you want it to expand. Also, select whether you want those pixels to be added to the current fill (Expand) or subtracted from the current fill (Inset).

    Shape Soften Fill Edges. In the resulting dialog box, you can set the width of the transition in pixels, the number of transition steps, and whether to soften outward (Expand) or inward (Inset).

    See Also

    Recipe 1.16




Flash 8 Cookbook
Flash 8 Cookbook (Cookbooks (OReilly))
ISBN: 0596102402
EAN: 2147483647
Year: 2007
Pages: 336
Authors: Joey Lott

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