When working in Flash, you may find yourself having a large collection of symbols such as movie clips, buttons, and graphics.
Having so many symbols can be difficult to keep track off, but Flash provides you with a feature that makes it easier - the Library. The Library is a centralized location where you can view, browse, add, delete, and organize symbols in much the same way as you would move and edit files on your computer.
So, let's start. First, download my FLA that contains some movie clips, graphics, and buttons:
Note
The Library can be viewed in a separate window or docked on the right. To dock or separate the Library, simply click on the left side of blue title bar and either drag it towards a dockable area or towards an empty area of your Flash window.
Adding an Item to the Library
Your library automatically adds items to it when a symbol is created. Select the text 'kirupa.com' on your drawing area by clicking on the text. Once you have selected the text, press F8 or go to Modify | Convert to Symbol.
The Convert to Symbol dialog box will appear. Select the option for Graphic, and in the field for Name, enter the word "text":
[ notice the Text graphic displayed in the Library ]
There is another way that you can add items to your Library. You can click the New Symbol icon, fill out the information in the Create New Symbol dialog box, and add the symbol directly to your Library without having it display on your stage first.
Either way, though, any symbol you create or convert is automatically added to your library. When an item is in the Library, it does not necessarily mean that the item is used. In fact, in our example, there were three items in our Library, yet none of the were displayed on the stage. Rest assured though. Displaying items from your Library is fairly straightforward.
Displaying Items from your Library
Displaying an item from your Library on your stage is as easy as dragging and dropping. Simply select an item, the circle movie clip, from your Library and drag it to your stage. You will now see the circle displayed on your stage:
[ select an item in your library and press the Delete button to remove the item ]
An item deleted from the Library cannot be brought back. If you have any instances of your deleted item on your stage, they will disappear once you delete that item from your Library. You do have the ability to Undo a delete, so that's good if you catch the deletion early on.
Organizing Items
If you have a lot of items in your library, it can become difficult to keep track of them. For example, if you had about 10 movie clips representing a particular effect, you may find it worthwhile to have them grouped together for easy access. That is where folders come in.
If you click the New Folder button in your Library, you will see a folder appear in your Items area. Give the folder the name "Graphics". Once you have done that, drag the polygon graphic and drop it on your folder icon. Double click on your folder icon now. You should see the Graphics folder expand to reveal the polygon graphic you just dropped in there:
The Linkage information that I posted above can also be gotten by simply right clicking on an item and selecting Linkage. For Images, Sounds, and Video, you cannot access the Linkage properties from using the Properties item. You will have to right click on the image, sound, or video item and select Linkage in order to change the Linkage values.
Summary
I will not deny it. This tutorial/article is not the most exciting one that you could have read or I could have written. There are no glitzy animations or cool ActionScript code for me to explain. Even though this is a very dry topic, it is a very important feature for you to become accustomed to.
Let me use an example involving the Folder/Files that most operating systems have. You can get away with saving all of your files in your desktop or on a default location on your Hard Drive. All of your files from e-mails to documents to WarCraft III replays, you can easily store in one folder. There is nothing wrong with that, but is it the most efficient way of storing and accessing your data?
Instead, imagine a system where you have individual folders and a hierarchical data structure that helps you to better organize your data. Pictures are in one location, Music is another location, etc. Would you not agree that having some organization is a 'good thing'?
That's the idea behind the Library. It is our equivalent of a 'good thing'. While you can easily go through Flash animations and never have to worry about organizing your library, you will find that, similar to not storing all files in one default location, the slight effort may be worth it. If you are collaborating with others or have a massive animation with hundreds of different symbols, an organized Library may be useful:
Forums. Just post your question and I, or our friendly forum helpers, will help answer it.
Also, if you are interested in helping out the kirupa.com site, Kirupa.com
I am a student at MIT majoring in Electrical Engineering and Computer
Science. When not crouched over in the fetal position after doing
classwork, I have been occassionally known for Flashing friends and
strangers on kirupa.com [http://www.kirupa.com] through tutorials
that emphasize the practical uses of Flash. The remainder of my time
is spent in airport terminals between home in Mobile, AL and college
in Cambridge, MA.
Using the Library
2 views
Comments (0)
Please sign in to leave a comment.





No comments yet. Be the first to comment!