[ Pobierz całość w formacie PDF ]
.92 Chapter 2Deleting library itemsWhen you delete an item from the library, all instances or occurrences of that itemin the movie are also deleted.The Use Count column in the Library windowindicates whether an item is in use.To delete a library item:Select the item and click the trash can icon at the bottom of the Library window.Finding unused library itemsTo reduce the size of a Flash FLA file, you can locate unused library items anddelete them.However, it is not necessary to delete unused library items to reducea Flash movie s SWF file size, because unused library items are not included inthe SWF file.To find unused library items, do one of the following:" Choose Select Unused Items from the Library Options menu." Sort library items by the Use Count column.See Sorting items in the Librarywindow on page 92.Updating imported files in the Library windowIf you use an external editor to modify files that you have imported into Flash,such as bitmaps or sound files, you can update the files in Flash withoutreimporting them.To update an imported file:Select the imported file in the Library window and choose Update from theLibrary Options menu.Flash Basics 93Working with common librariesYou can use the built-in libraries included with Flash to add symbols, buttons, orsounds to your movies.You can also create permanent libraries for your Flashapplication, which you can then use with any movies that you create.(The libraryyou create when authoring a Flash movie is available only with that movie, unlessyou make the library a permanent library or choose File > Open As Library.)Both of these types of libraries are listed in the Window > Common Librariessubmenu.To create a permanent library for your Flash application:1 Create a Flash file with a library containing the symbols that you want toinclude in the permanent library.2 Place the Flash file in the Libraries folder located in the Flash application folderon your hard drive.To use an item from a common library in a movie:1 Choose Window > Common Libraries, and select a library from the submenu.2 Drag an item from the common library into the library for the current movie.94 Chapter 2Using shared librariesYou can create shared libraries to use assets from one library in multiple Flashmovies.To use shared libraries, you define shared library assets in a movie, andthen link to those assets from other movies.When you link to an asset in ashared library, the asset is referenced as an external file, but the asset file is notadded to the movie.Using shared libraries can optimize your workflow and movie asset managementin numerous ways.For example, you can use shared libraries to do the following:" Share a sound file across a site" Share a font symbol across multiple sites (for information on font symbols, see Creating font symbols on page 217)" Provide a single source for elements in animations used across multiplescenes or movies" Create a central resource library to use for tracking and controlling revisionsAbout creating and linking shared assetsTo create a shared library that you can use with other movies, you define linkageproperties for items in a movie s library.When you save the movie, the sharedlibrary is saved with the movie s FLA file.To use assets from a shared library in another movie, you choose File > Open AsShared Library in the current movie, and select the shared library file that youwant to use.The shared library opens as a library window in the current movie.You then add assets from the shared library to the current movie s library to createlinks to the assets.You must post a shared library on the Web in order for movies that link to theshared library to display linked assets.To post a shared library on the Web, youpublish the movie in which you created the shared library.This procedure poststhe shared library to the URL where the movie s SWF file resides.(You can specifyanother location for the shared library if desired.)When you play a Flash movie that contains links to shared assets, the movie loadsthe shared library from its location on the Web and displays the shared assets asspecified.The movie downloads the entire shared library file when it reaches thefirst frame containing a linked asset.(If the movie contains linked assets frommore than one shared library, each shared library will be downloaded separately,when the first asset from that shared library occurs.)If an error occurs in downloading the shared library, the movie will not play.It isrecommended that you keep shared libraries as small as possible to minimizedownloading time, and that you test movies with linked assets to ensure thatdownloading functions properly.Flash Basics 95Defining shared library assetsYou use the Symbol Linkage dialog box to assign linkage properties to existinglibrary items in order to specify the items as shared library assets.After you assignlinkage properties to shared assets, you must save the movie file in which youdefined the shared assets, to make the assets available for linking from otherFlash movies.You also use the Symbol Linkage dialog box to assign an identifier name for amovie clip or a sound file that you want to play using the attachMovie orattachSound method.For information on the attachMovie method, see Attaching movie clips in the movie clips chapter of the ActionScript ReferenceGuide
[ Pobierz całość w formacie PDF ]