Recipe 1.24. Filling in Paths with Gaps


Problem

You want to fill in a nearly closed path, but Flash won't let you, because the shape isn't quite closed.

Solution

Change the Paint Bucket's Gap Size modifier to make Flash more tolerant of gaps. Or close the gap using any drawing tool or the Subselection tool.

Discussion

Generally, fills are available to closed shapes only. However, you might draw a line that is almost, but not quite, closed. This often happens when you draw with the Pencil tool using a graphics tabletthe shape looks closed to you, but not to Flash.

You can make Flash more tolerant of shapes that don't quite close by making Flash ignore small gaps. When filling shapes with gaps, Flash creates a hypothetical straight line between the points adjacent to the gap. It does not actually close the shape, and it is not possible to apply a stroke over this straight line; Flash merely tolerates the gap, enabling a fill to be applied.

You can specify how aggressively Flash should close gaps by using the Gap Size modifier, which appears in the Options tray of the Tools panel when the Paint Bucket tool is active. Settings include Don't Close Gaps, Close Small Gaps, Close Medium Gaps, and Close Large Gaps.

Often, Flash's idea of a large gap appears quite small to our eyes, and it's common that even with the most tolerant setting (Close Large Gaps), Flash will not fill a given shape. In such cases, you will have to manually close the gap (or at least enough of it to fit in Flash's Close Large Gaps range).

To close a gap, use one of Flash's drawing tools, such as the Pencil tool, Line tool, or Pen tool. The Pen tool usually works best, because it is the most precise. Remember that you can use the Zoom tool (M, Z) to make the gap easier to see and fill.

When closing a gap manually, match the original line with the new line that you are creating to bridge the gap. To do so, click the existing line with the Selection tool, and look at its attributes in the Property inspector: color, height, and style. Then set the active stroke to the same settings.

Another way to close gaps is to manipulate the points on the line. To do so, click one of the end points with the Subselection tool, and drag it until it overlaps the other end point.

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