Creating a Symbol

I l @ ve RuBoard

Each object you create increases the size of your final movie. What if you could reuse objects? You can. Any object you intend to use more than once should be turned into a symbol.

Symbols reside in the Flash library. You can drag multiple copies of a symbol from the library to the stage. Each copy of the symbol on the stage is an instance of the symbol. Adding multiple instances to your movie does not significantly increase the movie's size. Flash only saves the properties of the new instance; its description already exists in the library. When you change an instance in the library, all instances on the stage are updated.

Instances of symbols can have different colors, sizes, and behaviors.

In this exercise, you'll create a symbol. Later in the lesson, you'll edit this symbol in your Flash movie.

  1. Select both of the bitmaps in the Main Page Bitmaps layer, and choose Insert > Convert to Symbol.

    To select both bitmaps, Shift-click one bitmap, and then select the second one.

    When you choose Insert > Convert to Symbol, the Convert to Symbol dialog box opens. The Convert to Symbol command nests whatever you have selected into a symbol. You can also create a new, empty symbol by choosing Insert > New Symbol, which opens the Create New Symbol dialog box. This dialog box is identical to the Convert to Symbol dialog box.

    NOTE

    For future reference, both Convert to Symbol and Create New Symbol dialog boxes will be referred to as the Symbol Properties dialog box. The dialog boxes are identical, except for their titles.

  2. In the Symbol Properties dialog box, name the symbol Bitmap Animation. Make sure the Behavior is set to Movie Clip.

    graphics/03fig10.gif

    The Symbol Properties dialog box lets you set a name and behavior for a symbol. The name is important because it allows you to keep track of all your symbols; each symbol must have a unique name.

    Flash has four symbol behaviors: graphic, button, movie clip, and font. You can create graphic, button, and movie clip symbols using the Symbol Properties dialog box.

    Graphic symbols are useful for static images and reusable animations that are tied to the timeline. Graphic is the best behavior for a static graphic that you plan to use more than once in your movie. Graphic symbols can contain bitmaps, graphics, and other graphic symbols but cannot contain interactions or sounds. Graphic symbols can also contain movie clips, but if the movie clip includes interactions or sounds, the clip might not work properly in the graphic symbol.

    You can use the button behavior to create interactive buttons with different graphics for each button stateyou'll make and use a button in Lesson 5. Buttons can contain sounds, graphic symbols, bitmaps, movie clips, and vector graphics.

    Many of the symbols you create through the course of this book will be movie clips. Movie clips are great for reusable pieces of animation, which is exactly what the Bitmap Animation is going to be. Unlike graphic symbols, the animation in a movie clip is not tied to the timeline. You'll learn more about timelines in Lesson 4 when you start creating animations. Movie clips are basically minimovies inside the main movie. Movie clips can contain interactions, sounds, and other movie clips, as well as vector graphics, bitmaps, and graphic symbols.

  3. Set the Registration to the top-left corner. Click OK.

    graphics/03fig11.gif

    To set the registration, click the top-left square of the diagram in the Symbol Properties dialog box. Selecting the top-left square sets the registration point of the symbol to its top-left corner. The registration point of a symbol is the origin for the symbol, where its X and Y coordinates are both 0. You can set the registration point of a symbol to its top-left corner, top-middle edge, top-right corner, middle-left edge, center, middle-right edge, bottom-left corner, bottom-middle edge, or bottom-right corner. As you move right and down from the registration point of a symbol, the X and Y coordinates increase.

    When you click OK, Flash creates an instance of the Bitmap Animation movie clip. You should see a bounding box around both of the bitmaps, which are now nested inside the symbol. You should also notice a crosshair and white dot, the registration point, in the top-left corner of the symbol.

    graphics/03fig12.gif

    In addition to the Name, Behavior, and Registration properties, the Symbol Properties dialog box has an Advanced button. Clicking the Advanced button expands the dialog box to include Linkage and Source. You'll learn more about these properties later in the book.

    NOTE

    When you set the Behavior and Registration properties for a symbol, the next symbol you create automatically has the same properties. For example, if you create a symbol and set its Behavior to Movie Clip, the next time you open the Symbol Properties dialog box to create a new symbol, the Behavior will be set to Movie Clip. You can easily change the settings for the behavior and registration.

  4. Save the file as zoo8.fla.

    You now have a symbol in your movie. An instance of that symbol sits on the stage in the Main Page Bitmaps layer. Remember, an instance is just a copy of the original symbol.

    Keep the file open, as you will use it in the next exercise.

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