In Chapters 2 and 4, you learned to make and modify simple individual shapes from strokes (lines) and fills by using Adobe Flash CS3 Professional’s drawing tools. In your movies, you’ll want to use many shapes together, and you’ll need to combine strokes and fills in complex ways. You might combine several shapes, such as ovals and rectangles, to create a robot character, for example. To work effectively with complex graphics, you must understand how multiple graphic elements—merge-shapes, drawing objects, and primitive-shapes—interact when they’re on the same layer or on different layers. In this chapter, you learn how to work with multiple graphic elements on one layer in a Flash document. (To learn more about the concept of layers, see Chapter 6.)
Two of Flash’s drawing tools—the brush tool and the eraser—offer special modes for use with multiple fills and strokes on a single layer. In this chapter, unless you’re specifically requested to do otherwise, leave both tools at their default settings of Paint Normal (for the brush tool) and Erase Normal (for the eraser).
A group is a type of virtual container that holds graphic elements. Groups serve several functions. They prevent selected merge-shapes from interacting. They also lock down the attributes of shapes and preserve spatial relationships among graphic elements. Although you can also group drawing-objects and primitive-shapes, for the tasks in this section you want to see the interaction with merge-shapes; make sure the Object Drawing button in the Tools panel is deselected.
Flash groups the items, placing them within a bounding box (Figure 5.7). The visible bounding box lets you know that the group is selected. When the group isn’t selected, the bounding box is hidden.
• If you choose Modify > Group when nothing is selected, you immediately enter group-editing mode: anything you draw on the Stage is part of a new group.
To return objects to ungrouped status:
Flash removes the bounding box and selects all the items.
• The command for breaking apart symbols (Modify > Break Apart or -B (Mac) or Ctrl-B (Windows)) also works to ungroup groups. However, it can produce unexpected results on groups containing a mix of shape types. When a merge-shape is part of a group, the Break Apart command converts all the shapes to merge-shapes, even if they were drawing-objects or primitives originally. Break apart a group that contains no merge-shapes, and the group members revert to their original types. To retain the original status of all elements in a mixed group, use the Modify > Ungroup command.
• Interactions between strokes and fills occur not only when you draw a shape but also when you place a copy of a shape or move a shape. Be careful when placing copies of merge-shape fills and strokes on a single layer; you can inadvertently add to or delete part of an underlying merge-shape. If you ungroup a grouped shape that overlaps merge-shapes on a single layer, the shapes will segment one another.
To prevent interaction between merge-shapes on one layer:
When you finish drawing the new oval, it immediately disappears behind the grouped oval (Figure 5.11). That’s because grouped objects always stack on top of ungrouped objects (see the sidebar “Understanding Stacking Order,” later in this chapter).
Flash puts the small oval in a bounding box and brings it to the top of the stack (Figure 5.14). Flash always places the most recently created group on the top of the stack. Now you can reposition the two ovals however you like, and they won’t interact.
Although you can transform a group as a whole (scale, rotate, and skew it), you can’t directly edit the individual shapes within the group the way you can edit an ungrouped shape. To edit the shapes within a group, use the Edit Selected command.
To edit the contents of a group:
Flash enters group-editing mode (Figure 5.15). The Edit bar just above the Stage changes to indicate that you’re in group-editing mode. The bounding box for the selected group disappears, and Flash dims all the items on the Stage that aren’t part of the selected group. These dimmed items aren’t editable; they merely provide context for editing the selected group.
• Choose Edit > Edit All.
• Double-click an empty area of the Stage or the Pasteboard.
• Click the current scene name in the Edit bar.
• Click the Back button in the Edit bar.
• To enter group-editing mode quickly, double-click a grouped item on the Stage with the selection tool.
• When the Properties tab of the Property inspector is open, you can see—and change—the height, width, and x- and y-coordinates of the bounding box of a selected group (Figure 5.16).
• When you’re editing a group nested within another group, clicking the Back button moves you up one level in the nesting hierarchy.
• You can also enter group-editing mode for a selected item by choosing Edit > Edit in Place. When you edit groups, there is no difference between this command and Edit > Edit Selected. There is a difference when you use these commands to edit symbols. (You’ll learn about symbols in Chapter 7.)
Within a single layer, text fields, grouped objects, drawing-objects, and primitives stack as if they were sitting on sublayers above any ungrouped merge-shapes. Stacking order exists even if objects don’t literally lie on top of one another. If you have a group on one side of the Stage and a drawing-object on the other, you can’t see which one stacks higher than the other; but if you drag the objects so they overlap, the order becomes apparent. (Symbols, which you’ll learn about in Chapter 7, are another type of graphic-object that stacks on top of ungrouped merge-shapes.)
You can change the stacking order of graphic-objects via the Modify > Arrange menu. You can move objects up or down in the stacking order one level at a time, or you can send an object to the top or bottom of the stack of sublayers.
To change position in a stack by one level:
Use any combination of grouped shapes, drawing-objects, primitives, or text fields.
• To move the selected item up one level, choose Bring Forward, or press –up arrow (Mac) or Ctrl–up arrow (Windows).
• To move the selected item down one level, choose Send Backward, or press –down arrow (Mac) or Ctrl–down arrow (Windows).
Flash moves the selected item up (or down) one sublayer in the stacking order (Figure 5.18).
To move an element to the top or bottom of the stack:
• To bring the item to the top of the stack, choose Bring to Front, or press Option-Shift–up arrow (Mac) or Ctrl-Shift–up arrow (Windows).
• To move the item to the bottom of the stack, choose Send to Back, or press Option-Shift–down arrow (Mac) or Ctrl-Shift–down arrow (Windows).
Flash places the selected item at the top (or bottom) of the heap.
Drawing-objects and primitive-shapes don’t interact with one another or with merge-shapes, even when they overlap. You can force them to interact by using the Modify > Combine Objects commands. Flash converts combined primitives to drawing-objects.
To unite multiple drawing-objects or primitives:
• Make two or more overlapping fills with the same colors.
• Make two or more overlapping shapes with fills and strokes; use different colors for the fills and strokes in each shape.
The two fills become a single drawing-object shape (Figure 5.19).
The fills and strokes of the shapes segment one another, but you wind up with a single drawing-object containing all those segmented shapes (Figure 5.20).
• You can also use the Modify > Combine Objects > Union command to combine a mix of merge-shapes, drawing-objects, and primitives into a single drawing-object.
• To access and edit merge-shapes inside a drawing-object, double-click it (Figure 5.21).
To use one drawing-object to remove part of another:
Intersect retains fills and strokes only where all the selected shapes overlap, and deletes all other fills and strokes. The resulting shape(s) take stroke and fill attributes from the topmost shape.
Punch uses the topmost shape like a cookie cutter to remove any shapes directly below it. (Imagine the shape left in the cookie dough after you’ve cut out a cookie; that’s what Punch creates.) The resulting shape(s) retain their original attributes.
Crop uses the topmost shape like a cookie cutter to select a new shape from any shapes that lie below it. (Imagine the cookie cutter again, but this time you wind up with the cookie itself.) The resulting shape(s) retain their original attributes (Figure 5.22).
• When you select merge-shapes, the Modify > Combine Objects menu only offers the Union command. You can use this command instead of grouping merge-shapes. The Union command preserves the spatial relationships between shapes but gives you the ability to change fills and strokes directly on the Stage as described in Chapter 4.
• If you choose Modify > Combine Objects > Intersect and all your shapes disappear, it means there was no place where they all intersected. That result may seem self-evident, but if you’ve selected many shapes or your shapes are complex, it may be difficult to see.
3.14.70.163