Creating Shapes on the Stage
Although you normally create sprites by dragging a cast member from the Cast window to the Stage, it's possible to draw very simple sprites directly on the Stage. You do this by using the Line and shape tools in the Tool palette ( Figure 9.18 ). When you draw a shape on the Stage, it appears automatically in the Cast window.
Figure 9.18. The full Tool palette.
Shapes drawn on the Stage are essentially vector graphics, but they use a different (and older) technology than what's used in the Vector Shape window. They lack anti-aliasing, and they animate a bit more slowly than standard vector or bitmapped sprites. On the positive side, they consume virtually no memory and add practically nothing to a movie's file size . They're also quick and easy to create.
These simple shapes come in handy for a variety of tasks for example, creating colored backdrops for a movie (see Figure 9.3 ) or temporarily hiding other sprites ( Figure 9.19 ).
Figure 9.19. The word Introducing... is covered by a rectangular shape the same color as the Stage background, then gradually revealed through tweening.
To choose a line width:
Click a line in the line-width selector in the Tool palette ( Figure 9.20 ). (The dotted line represents no line.)
Figure 9.20. Click a line to choose a line width.
The next time you use the Line tool or any of the shape tools, the tool will draw with the specified line width.
To choose a color and pattern:
Select the desired colors from the Foreground and Background Color menus ( Figure 9.21 ) in the Tool palette.
Figure 9.21. Select a foreground color, background color, and pattern.
The selected foreground color applies to all lines, to the fill color of filled shapes, and to the foreground color of patterns.
The background color applies only to the background of patterns.
Select the desired pattern from the Pattern menu.
The selected pattern appears only in filled shapes. The default setting is a solid pattern (which is to say no pattern at all).
To draw a line:
In the Tool palette, click the Line tool ( Figure 9.22 ).
Figure 9.22. Use the Line tool to add straight lines to a shape on the Stage.
Drag on the Stage to draw a line.
Release the mouse button when the line has the desired length and direction.
To draw a shape:
Click one of the shape tools in the Tool palette ( Figure 9.23 ).
Figure 9.23. The shape tools.
On the Stage, drag diagonally to make a shape.
Release the mouse button when the shape has the desired height and width.
To edit the characteristics of a line or shape:
Click the Arrow tool in the Tool palette.
On the Stage, select the line, shape, or group of lines and shapes that you want to adjust.
Choose a new color, pattern, or line width from the Tool palette.
The selected sprites change to reflect the new setting.
Sprites drawn on the Stage can be resized, rotated , skewed, and so forth like any other sprite. See "Changing Sprite Properties" in Chapter 3.