Section 5.5. Working with the Library


5.5. Working with the Library

Importing many graphics, and perhaps creating symbols along the way, can leave your Library a bit of a mess. To begin with, since bitmaps can be large, Flash automatically places a copy of each one in your Library. You will soon find out that the same is true for sounds and videos. Much like with symbols, you can drag these elements to the Stage, making multiple instances without noticeably increasing file size.

Furthermore, importing some types of assets will result in your Library filling up with additional objects. As you read earlier, FreeHand and Fireworks both translate their symbols into Flash symbols whenever possible. Sometimes, as you saw when working with the Fireworks file, additional folders are created in the process. Keeping the Library tidy is important if you want to keep your files manageable.

5.5.1. Organizing Your Library

There are many ways to organize a Library. Some developers like to use folders for each type of asset, while others organize assets according to their function. Still others prefer to organize Libraries based on the order of use. For example, in a Flash file for a cartoon, the Library might be organized so that each character's assets are in one place, and are further divided into subfolders to keep animated and inanimate symbols separate. A movie clip for a walking sequence could be in a folder with blinking eyes, for instance, while the hair and nose might be in another folder.

To create a folder in a Library, use the New Folder button in the lower-left corner of the Library panel, which looks like a folder with a plus sign (+). You can also create a new symbol using the New Symbol button to the left, and delete an element using the Delete button, which looks like a trash can.

You can add as many folders to the Library as you want, and inside each folder, you can nest other folders. How you organize the Library does not affect the movie at runtime at all. The important thing is just to stay organized, so assets are always easy to find. Large projects can contain hundreds of assets, and keeping them organized is key to maintaining a good workflowincluding working with multiple files.


Note: Be aware that deleting a folder also deletes all of its contents. If you want to keep certain assets from a folder you plan to delete or want to reorganize your Library, simply drag assets from one folder to another. Although deletions can be undone, it is a good idea to make a backup copy of your .fla before doing anything major.

5.5.2. Sharing Libraries During Authoring

Your organization can have far-reaching effects, because Flash 8's new Library enhancements make it easier than ever to share assets between multiple files. As discussed briefly in Chapter 1, you can now show the Libraries for all open documents in one Library panel, using a menu to choose the current Library (see Figure 5-14). This simplifies dragging an asset you want to reuse from one document to another, or from a common Library to the document of your choice. If you prefer, you can spawn a new Library panel to drag symbols between them.

Figure 5-14. An organized Library, with key features highlighted


Even with these features, working with multiple documents can still get confusing. If desired, you can "pin" a Library to a specific document. This way, you can still select any open Library, but each time you switch between documents, any Library pinned to the active document will be displayed.

The Library is also a central location for modifying many properties for symbols and imported assets. A context-sensitive Properties button will show the properties of most selected Library items. It looks like an i and can be found between the New Folder and Delete buttons in the Library panel's lower-left corner. (The menu in the upper-right corner of the Library panel is also handy for exposing these properties.) You'll look at several properties in upcoming chapters, but for now you'll concentrate on two that are specific to images.

5.5.3. Compression Settings

Flash allows you to compress your graphics in a few different ways. With a JPEG, for example, you can retain the compression setting applied when the JPEG was created, or you can override its compression setting and apply a new one on a case-by-case basis. Figure 5-15 shows the Bitmap Properties about a JPEG, accessible from the Library's Properties button or menu after selecting the JPEG you want to examine.

Figure 5-15. A test of the cheesecake.jpg compression settings reveals that, at a quality setting of 50, the compressed image is expected to occupy 15.5 KB of file size


In addition to information such as the import time and the location of the source file, there are a few settings here that you can adjust to optimize the bitmap. You can smooth its edges with anti-aliasing, choose between compression methods of Photo (best for continuous tones) and Lossless (best for larger areas of solids), and set the degree of compression used. In this case, the compression used when the graphic was created is being changed to 50% compression. (Higher values yield better looking, but larger, graphics.) Clicking the Test button will show you the expected size of the graphic at runtime.

5.5.4. Roundtrip Editing

Right/Ctrl-clicking on a bitmap in the Library is another way to quickly access additional features, including roundtrip editing. This convenient feature enables the editing of a selected asset in an appropriate external editor, and then automatically updates the embedded asset with the changes. For example, Figure 5-16 shows the launching of Fireworks to edit a .png document. This can dramatically speed workflow, because it means that you don't have to reimport assets that require editing.

Figure 5-16. Roundtrip editing allows you to edit a Flash asset in a specified application, make changes, and then automatically update the Flash file upon closing the document in the external editor


These Library features, and your growing familiarity with the Libraries, will become very important when you start filling them with assets. In Chapters 8 and 9, you will begin using sound and video, and in the next chapter, you will work with additional symbols, including movie clips.

5.5.5. What's Next?

As you can see, Flash is capable of importing several different kinds of graphic file formats and manipulating those assets in many ways. Now that you know what you can work with, the creative part is up to you. In Chapter 12, you'll learn how to load external graphics files on the fly, but for now try working with the skills you've already acquired.

Toy with bitmaps in clever ways to try to create interesting effects. For example, break one apart and recolor portions of the image for a primitive silk-screened look. Create different kinds of bitmap tile tweens for large but file-size-efficient background effects. Trace different kinds of images with different Color Threshold and Curve Fit settings to achieve a fun, posterized effect. If you end up with something you like, put it aside until Chapter 7, when you can begin morphing the image into new, unimagined artworks.

In the next chapter, you'll work more closely with movie clips and add more interactivity to your files. You'll learn:

  • How to create movie clip animations

  • How to create, and improve, character walk cycles

  • More about symbol instance names

  • How to use ActionScript to control one movie clip independently of another

  • How to target a symbol using absolute or relative pathnames

  • How to make your movie clips respond to user mouse clicks



Flash 8(c) Projects for Learning Animation and Interactivity
Flash 8: Projects for Learning Animation and Interactivity (OReilly Digital Studio)
ISBN: 0596102232
EAN: 2147483647
Year: 2006
Pages: 117

Similar book on Amazon

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