Symbols and Libraries

Review


Let’s take a few minutes to review some of the concepts that we learned last week.



































Quiz
1. What indicates the current frame displayed on the Stage?
2. What is a frame which you define a change to an object’s properties for an animation called?
3. On the indivual frames, what indicates that it is a keyframe?
4. What is the shortcut for adding more frames?
5. What the shortcut to view the Scene inspector?
Did you get the answers right? Click to check your answers.
Check answers

Introduction


So far in Flash we’ve learned about how to use the tools on the toolbar and about the timeline and scenes. Now we will focus on Flash components that we want to reuse. Symbols are just that, components that we either create or that we import in which we will use them more than once in your project. There are three kinds of symbols: graphic, button, and movie clips.


Symbols good because they made your file sizes smaller. The symbol itself is stored in the library, and each time you use that symbol on the screen is called an instance. So an instance is just a reference to the symbol in the library. You can change properties of the instance without effecting the stored symbol.


Types of Symbols


To make a symbol have the object select in which you want to convert to a symbol, then go to Modify–>Convert to Symbol (or right click and Convert to Symbol). Then you need to decide which of the three type to choose. The first type of symbol is a graphic symbol. Graphic symbols are the basic type of symbols that you will normally use because they are synchronized to the main timeline of your project.


The next type is the button symbol. Button symbols have four parts: an up frame, a down frame, an over frame, and a hit frame. Each are a part of the button that you can change to make the button react like a typical non-computer realated button. The Up frame is the original button state, and you most likely will leave that the way it is. The Over state is what happens when the mouse is over the button. Start with the same frame by right-clicking on the over frame and click Insert Keyframe. Then you should make some change to it. The Down state is what happens when the mouse clicks down on the button. Do the same thing, insert a keyframe and then change it. Hit is what will happen after you release the button.




Practice:


  1. Open Flash and create a new document.

  2. Draw a rectangle with the Rectangle tool.

  3. Add a text box over the rectangle.

  4. Convert it to a symbol and choose Button. Save it as “first btn

  5. Then use the Up, Down, Over, and Hit frames to make button look good.

  6. Name the instance of your button on the stage as “first_btn

  7. Add a new layer called “actions”. Add the ActionScript to link your button to a website of your choice.

  8. Test your button. Save it as first button.fla


The last type of symbol is a Movie Clip Symbol. It is similar to a graphic symbol except that it is not synchronized to the main timeline. If the timeline stops movie clip symbols will continue playing. This is if you want to have a constant action happening in your movie that is independent of the rest of your movie.


The Library


The Library is the window that should already be on your screen that stores all of your symbols. If it is not there go to Window–>Library (Ctrl+L). You can make folders in the library to better organize your symbols if you have many. It is a good idea to have somekind of order to your library to help your remember what exactly all your files do and where they are. You can sort by names, types, usage count, or date modified similar to files on your computer. It also shows different icons for the three kinds of symbols.

Also, available in Flash are Common Libraries, containting already made buttons, classes and learning interactions. To access these go to Window –>Common Libraries.

Difference between a Symbol and an Instance


Every time you use a symbol by dragging it from the Library to the Stage, it is called an Instance. Although they seem to be the same, they aren’t. The difference is when using a symbol and making changes on it will update each instance, not changing the symbol saved it the library.


To help understand the difference click here to complete an exercise.