Controlling Stacking Order
Complex Graphics on a Single Layer
153
Controlling Stacking Order
Within a single layer, text  elds, grouped
objects, drawing-objects, and primitives
stack as if they were sitting on sublay-
ers 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
youll learn about in Chapter 7, are another
type of graphic-object that stacks on top of
ungrouped merge-shapes.)
Understanding Stacking Order
Merge-shapes on a single layer always stay on the same layer, segmenting one another
whenever they inhabit the same space on the Stage. All graphic-objects (drawing-objects,
primitives, text  elds, groups, and symbols) stack on top of one another. By default, Flash
stacks each new graphic-object that you create on top of the preceding one; the last graphic-
object created winds up on top of all the others (Figure 5.17). A higher-level graphic-object
obscures any graphic-object that lies directly beneath it.
Figure 5.17 This schematic shows Flash’s default stacking order for graphic-objects.
The most recently created graphic-object is on top. Merge-shapes are always on the bottom.
Primitive-shape created 7th
Drawing-object created 6th
Text fi eld created 5th
Group created 4th
Primitive-shape created 2nd
Merge-shape created 1st
Merge-shape created 3rd
Controlling Stacking Order
Chapter 5
154
Figure 5.18 Each dumbbell-like shape here is a
separate group (top). Choose Modify > Arrange >
Bring Forward (middle) to move a selected group up
one level in the stacking order (bottom).
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:
1.
On the Stage, create at least three graphic-
objects.
Use any combination of grouped shapes,
drawing-objects, primitives, or text  elds.
2.
Select one of the graphic-objects.
3.
From the Modify > Arrange menu, choose
either of the following:
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:
1.
On the Stage, select one of the graphic-
objects you created in the previous task.
2.
From the Modify > Arrange menu, choose
either of the following:
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.
Created 1st
Created 2nd
Created 3rd

Get Adobe Flash CS4 Professional for Windows and Macintosh: Visual QuickStart Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.