Creating a Group

I l @ ve RuBoard

Creating a Group

You can manipulate elements on the stage as a single object by grouping them. This capability can be useful when you're working with a complex graphic because, as you will see in this exercise, Flash treats each piece of a vector graphic as a separate object. If you have a graphic that contains several pieces, manipulating all the pieces consistently can be difficult.

In this exercise, you will group all the rectangles that make up the background graphic. You should be working in your zoo3.fla file.

  1. Select the arrow tool and click in the white fill of the innermost rectangle on the stage. Press Delete or Backspace.

    graphics/02fig21.gif

    What happened to the other rectangles? You should now have a drawing that looks something like the figure above. If you're familiar with other drawing tools, you're probably somewhat surprised by the results.

    Unlike many programs, Flash treats strokes and fills as separate entities. When you selected the rectangle's fill by clicking it with the arrow tool, you selected the interior (the fill), but not the exterior (the stroke). If you use the arrow tool to select a fill and move it, the outline stays behind.

    Another interesting behavior is that every time one shape overlaps another, the shapes are divided into segments wherever they intersect. So you might have noticed that when you deleted the rectangle's fill, the fill that was behind it is no longer there. That's because drawing the rectangle on top of it removed the other fill from your drawing. The same would be true if you drew a fill over a lineremoving the fill would also remove the line behind it.

  2. Press Ctrl+Z (Windows) or Command+Z (Macintosh).

    This is probably one of the most useful shortcuts in Flashby pressing Ctrl+Z or Command+Z on the keyboard, you can undo the previous action. It's the same as selecting Edit > Undo from the menu. The number of undo levels is set in the preferences (Edit > Preferences), as you learned in Lesson 1.

    When you undo the previous action, the fill you deleted should reappear. Now it's time to select all the shapes you've drawn and put them into a single group so they're a little easier to handle.

    TIP

    Flash also has a sort of "mega-undo" command. If you really messed up, and just want to go back to the previously saved version of a file, choose File > Revert.

  3. Choose Edit > Select All.

    Everything on the stage is selected.

    graphics/02fig22.gif

    TIP

    Instead of choosing Edit > Select All, you can press Ctrl+A (Windows) or Command+A (Macintosh). Many of the commands in the menus have shortcuts. You can customize the keyboard shortcuts by choosing Edit > Keyboard Shortcuts, as you learned in Lesson 1.

  4. Choose Modify > Group.

    Everything you selectedthe entire background drawingis now part of a group. A blue bounding box appears around the group, indicating that it is a single selected element.

    As with many commands in Flash, the Group command has a shortcut key. Just press Ctrl+G (Windows) or Command+G (Macintosh) to create a group.

    TIP

    You can change the color of the bounding box in the preferences window. Choose Edit > Preferences and modify the Highlight Color setting. By default the Highlight Color is bluechange this color by clicking the color box and selecting a new color with the pointer.

  5. Double-click the group.

    In the top-left corner of the screen, just below the timeline, an icon labeled Group appears, indicating that you are editing a group. You can now edit any part of the group without disturbing the rest of the movie.

    graphics/02fig23.gif

  6. Click the Scene 1 icon next to the Group icon.

    This takes you back to the movie, so you are no longer editing the group. You can also go back to the movie by double-clicking anywhere outside the group, or by clicking the Back button to the left of the Scene 1 icon.

    NOTE

    The Scene 1 and Group icons are found in an area of the screen known as the information bar. There are several other icons and settings heremove your pointer over each one to see a Tooltip indicating its name . The drop-down menu on the far-right side of the information bar is the zoom control, which allows you to choose different magnification settings for the stage. You can choose 25%, 50%, 100%, 200%, 400%, or 800% to zoom in or out from the current magnification. The Show Frame option lets you view the entire stage, while the Show All option lets you view the contents of the stage. If you choose Show All, and the stage is empty, the entire stage is displayed. You can also type a number into the zoom control, and when you press Enter, Flash will set the current magnification to that level. Flash can zoom in as much as 2000% and out as little as 8%.

  7. Save your movie as zoo4.fla in the FlashTFS folder on your hard drive.

    Now it's time to add a little content to the movie. That's what you'll do over the course of the next several lessons in this book.

I l @ ve RuBoard


Macromedia Flash MX. Training from the Source
Macromedia Flash MX: Training from the Source
ISBN: 0201794829
EAN: 2147483647
Year: 2002
Pages: 115
Authors: Chrissy Rey

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