Symbols, Instances and Library in Flash CS3

Symbols, Instances and Library in Flash CS3
Three of the most important features of FlashR are Symbols, Instances and the Library. By using these three together, you can keep the size of your Flash file smaller and your movie will download more quickly. How?

Every time you add something to your Flash movie such as an image, you are adding more information to the Flash file. Let's say we are creating a snow animation and we draw every snowflake for our animation at a different position on the stage. If we have 100 flakes in our animation, that's a lot of information to be stored and our file will get larger each time we add another snowflake. But, if we had only one snowflake and a way to tell Flash to draw that same snowflake at 100 different positions on the stage, can you imagine how much smaller our file size would be? Instead of storing the information about how to draw and position each snowflake, we only need to store the information for how to draw one snowflake and where to place 100 instances of that snowflake.

What is this "instance" thing? An instance is a pseudo copy of an original object, in our case, the snowflake. Why a pseudo copy and not a copy? Well, a copy of the original will contain the same amount of information as the original. That doesn't really help us very much. An instance, or pseudo copy, is more like a pointer that points to the original snowflake and tells Flash to "draw this" one hundred times.

Now we have decided to use one original snowflake and 100 instances of that snowflake. But in order to use the original snowflake as a master or "blueprint" for the others, we must first turn it into a Flash symbol. The Flash symbol is a very powerful creature and there are many reasons for using one. You will be using many of them and they will become your best friend. So, how do you make one?

There are two ways to make a symbol. If we knew from the start that we would need 100 instances of a snowflake, we really wouldn't need to draw a master snowflake on the stage at all. We could just make the snowflake symbol from scratch and then use 100 pseudo copies of it. But since we already have the original object, our snowflake, on the stage, we can now convert it to a symbol. Either method we use, our symbol will be placed in the Flash library for safe keeping and only the instances will remain on the stage. This comes in handy if we need to make any changes to our snowflakes. Let's say that we decide that our original snowflake is too large. If we were not using symbols and instances, we would need to manually resize each of the 100 snowflakes on the stage. However, we have the master safely stored in the Library as a symbol. When we resize the symbol, all 100 instances of the snowflakes on the stage will magically resize to the same dimensions.

In the next tutorial, we will draw our snowflake, convert it to a symbol, add several instances on the stage and resize all of them by editing the original symbol.

Copyright 2018 Adobe Systems Incorporated. All rights reserved. Adobe product screen shot(s) reprinted with permission from Adobe Systems Incorporated. Adobe, Photoshop, Photoshop Album, Photoshop Elements, Illustrator, InDesign, GoLive, Acrobat, Cue, Premiere Pro, Premiere Elements, Bridge, After Effects, InCopy, Dreamweaver, Flash, ActionScript, Fireworks, Contribute, Captivate, Flash Catalyst and Flash Paper is/are either [a] registered trademark[s] or a trademark[s] of Adobe Systems Incorporated in the United States and/or other countries.





RSS
Related Articles
Editor's Picks Articles
Top Ten Articles
Previous Features
Site Map








Content copyright © 2023 by Diane Cipollo. All rights reserved.
This content was written by Diane Cipollo. If you wish to use this content in any manner, you need written permission. Contact Diane Cipollo for details.