Symbols Explained


You worked with a symbol in Lesson 2 when you created some of the graphics for the background of the website. The specific symbol that you used was a graphic symbol, which is great for displaying multiple instances of the same graphic. You also took items from the library and placed them onto the Stage, and found out that the library is used to store assets you use in FLA files. The second point here is important because the library stores symbols (graphic, movie clip, button, and the often-forgotten font symbol), not to mention video clips, bitmap images, sound files, and components. In fact, if it can be seen or heard, it's usually stored in the library; with the notable exception of the graphics you draw yourself on the Stage. Well, unless you convert them into symbols. But I digress.

Flash has three primary kinds of symbols that you can build within the authoring environment: movie clips, buttons, and graphics. You created graphic symbols in Lesson 2 and found out that symbols can contain images such as the vector graphics you created using the drawing tools. New to you is the button symbol. Buttons are symbols that contain four states that determine how the button looks and works in relation to the mouse. You use buttons to create interactive elements in the SWF file, such as navigation menus, rollover effects such as tooltips, and hot spots.

Also at your fingertips is the movie clip symbol. This symbol is the symbol to get to know. Even your Stage is a movie clip symbol. Movie clips are essentially little Flash applications with their own independent Timelines that do whatever you want them to do. They are scriptable Objects, too, which make them ideal for interactivity, nested animations, and a whole host of radically cool things (if you're a proud geek, that is).

You can also create font symbols in Flash, which are stored in the library and never dragged onto the Stage. You would use a font symbol for asset sharing, which can keep file size down and allow team members to use a font outline from within Flash if for some reason they don't have the font itself. Everybody forgets about the font symbol, which is sad because it's very useful in a pinch.

Tip

You can find out more about using font symbols and embedding fonts on the book's website at www.TrainingFromTheSource.com/bonus.


Symbols always reside in a library. When you drag a symbol from the library onto the Stage, it's referred to as an instance. An instance is really just a reference to the symbol in the library (meaning that you can have many instances on the Stage derived from a single symbol). Instances have some small measure of independence and can be scaled, tinted, made transparent, rotated, skewed, and made darker or brighter without affecting its brother and sister instances. Movie clip and button instances can be named using the Property inspector, so you can boss them around using ActionScript or one of the canned behaviors that comes with Flash 8. If you modify the properties of instances using ActionScript or the Property inspector, it does not affect the symbol in the library. If you edit the symbol from the library in symbol-editing mode, all the symbol's instances you have on the Stage are affected, which is good because it means than any updates to the graphics contained in the symbol are automatically pushed out to the symbol instances on the Stage. Of course, if you didn't mean to edit a symbol's master properties, it's not such a good thing, but that's why the thoughtful engineers of Flash included the lovely Undo function.

All the hullabaloo of symbols really comes down to this: Symbols are reusable. If you need to have 18 squares that might differ only in tint or scale, it doesn't make sense to make whole new square graphics. Make a symbol, draw a square in it, drag 18 instances of it out on the Stage, and change their respective tint and scale. Because those instances are really just references, your file size stays nice and small. Drawing 18 more squares adds weight.

Note

Remember that when you import assets such as video clips, bitmaps, fonts, and sounds, they are added to the library as well. So when the assets are added to the Stage, they are essentially copies (or instances) of the item stored in the library.





Macromedia Flash 8. Training from the Source
Macromedia Flash 8: Training from the Source
ISBN: 0321336291
EAN: 2147483647
Year: 2004
Pages: 230
Authors: James English

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