Welcome to WebProNews Breaking eBusiness and Search News
Advertise | Newsletter | Sitemap | News Feeds News Feed 
 WebProNews Search Part of the iEntry network iEntry inc. 

Using The Library

Kirupa
Expert Author
Published: 2005-07-01

WebProNews RSS Feed


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:

Download Partial FLA

Once you have downloaded the above file and unzipped it, open the library.fla in Flash.

The Library

When you opened library.fla, you should see some text and nothing else. That's ok, for the real action is in the Library! Press Ctrl + L or navigate to Window | Library. You should see the Library panel appear.

The following graphic outlines what each icon and section of the Library represents. It will be useful for you to refer to this for I will be using these labels when talking about the Library throughout this and the next page:



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":



[ convert your text to Graphic ]


Press OK. The Convert to Symbol dialog box will have disappeared, and your text object is now a Graphic. But, take a gander at your Library. Notice that you now see a graphic symbol with the the name text displayed in the Items list:



[ 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:



[ drag and drop the circle movie clip to your drawing area ]


You can drag multiple instances of the same item. Click and drag your circle movie clip again from the Library to the stage. Notice that you now have two copies of your circle movie clip on your stage now.

If you decide that you don't like having two circles or any circles on your stage, simply select your circle/circles and press your Delete key. Deleting an item from your stage does not delete the item from your Library, but the opposite - deleting an item from the Library - is not the same.

Deleting Items from your Library

In order to delete an item from the Library, select the item in the Library first. Once the item has been selected, press the Delete button in the Library:



[ 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:



[ organize your library with folders ]


You can drag more items and place it there if you like. You can also place folders within folders! There is a slight dark side to folders though. If you accidentally delete a folder, any items that were contained inside it would be lost also. And that is bad!

Properties

All of your items have more properties than those displayed by the Create New Symbol or Convert to Symbol dialog boxes. Guess where you access those properties from? If you guessed the Library, you are correct!

Each item type such as a Graphic, Movie Clip, Button, Image, Sound, and Video have their own customized properties that are specific to their type. For example, select the square button and press the Properties button (the blue circle with the italicized i) found on the bottom row of icons in your Library area. You can also right click on the square button item and select the menu-item, Properties.

Whichever way you decide to access the Symbol Properties, make sure to press the Advanced button from the Symbol Properties dialog box. The top half of the Properties is exactly the same as what you would see from a Create New Symbol or Convert to Symbol dialog boxes. The new feature is the area marked Linkage, and here you can do some interesting stuff that I will not get into in this tutorial.



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:



[ example of a movie with hundreds of symbols ]


I hope the information helped. If you have any questions or comments, please don't hesitate to post them on the 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, click here to find out how.

*Originally published at Kirupa.com

Receive Our Daily Email of Breaking eBusiness News


About the Author:
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.

WebProNews RSS Feed

More Articles

Contact WebProNews
Advertisement





TOP NEWS

Targeted Information for Business
WebProNews is part of the iEntry network

Internet Business: Marketing: Small Business:
WebProNews MarketingNewz SmallBusinessNewz
WebProWorld AdvertisingDay PromoteNews
EcommNewz SalesNewz EntrepreneurNewz

Software: Search Engines: Web Design:
WebMasterFree Jayde B2B DesignNewz
NetworkingFiles SearchZA FlashNewz
SecurityConfig SearchNewz WebSiteNotes

Developer: IT Management: Security:
DevWebPro ITManagement SecurityProNews
DevNewz SysAdminNews SecurityConfig
TheDevWeb NetworkingFiles NetworkNewz

The iEntry Network consists of over 100 web publications reaching millions of Internet Professionals. Contact us to advertise.
eBUSINESS RESOURCES






 Advertise | Contact Us | Corporate | Newsletter | Sitemap | Submit an Article | News Feeds
 WebProNews is an iEntry, Inc. ® publication - $line) { echo $line ; } ?> All Rights Reserved
About WebProNews
WebProNews is the number one source for eBusiness News. Over 5 million eBusiness professionals read WebProNews and other iEntry business and tech publications.

WebProNews provides real-time coverage of internet business.

Free Email Newsletters:
WebProNews SearchNewz
WebProWorld DevWebPro
Marketing SecurityNews
Plus over 100 other newsletters!

Send me relevant info on products and services.


WebProWorld
Ten most recent posts.

NetworkingFiles
Featured Software

WebProNews in the News
View all recent mentions of WebProNews from around the world!

Recent Articles On ...
Google eBusiness
Yahoo Ask Jeeves
MSN Blogs
Search Engines Blogging
Affiliate Programs Marketing
eCommerce Advertising
eBay Sun Microsystems
AOL Adsense
Microsoft Adwords
Oracle IBM
Amazon Apple
SEM Mac
SEO iPod
Adsense XBox
PR Adobe



iEntry.com WebProWorld RSS Feed WebProWorld Contact WebProNews Print Version Email a friend Bookmark us