Using Authortime Shared Libraries


Flash gives you two options for working with shared assets: Authortime and Runtime shared Libraries. Authortime sharing enables a development team to maintain consistency during production on multiple versions of a file or on various project files that use the same symbols by using a centralized internal source .fla file for fonts or other assets. Runtime sharing reduces file sizes and makes it easier to dynamically update content in projects that involve multiple .swfs without having to republish all the files. In Runtime sharing, a Library of assets is created and published as a source movie (.swf) that is uploaded to the server to be shared with multiple linked movies (.swfs). Source assets in shared libraries can include any element that is normally created in a Flash movie, as well as assets such as bitmaps, fonts, sounds, or video that are imported and usually embedded in individual project files (.fla).

Runtime sharing involves URLs and linkage info, but Authortime sharing is relatively simple and can be accomplished without even publishing any .swf files. You can update or replace a symbol in your current project (.fla) with any other symbol accessible on your local network. Any transformations or effects applied to instances of the symbol in your project file will be preserved, but the contents of the symbol stored in the project Library will be replaced with the contents of the new (or modified) source symbol that you choose to link to.

Note 

For clarity, we will refer to the currently open .fla file as a project file, and the .fla that contains symbols that you want to link to, as the source file. In real-world production, you can give the files any name you like. However, adding a special identifier such as "Library" or "Source" to the .fla filenames that you plan to use for sharing can help you (and your team) minimize confusion.

On the CD-ROM 

We have included two sample files with some basic symbols that you can use to try out the symbol-linking feature. Both shapeProject.fla and shapeSource.fla are in the ch06 folder on this book's CD-ROM.

To link a symbol from one project Library to another, you need a source file and a project file. Open the project file and follow these steps.

  1. In the current project Library panel, select the symbol (Graphic symbol, Button, or Movie Clip), that you want to link to a source symbol.

  2. Choose Properties from the contextual menu or from the Library options menu and under Source in the Symbol Properties dialog box, click the Browse button to find the .fla file that contains the symbol you want to use as a source. After you find the .fla that will be your source, select it in the file list and click the Open button (as shown in Figure 6-25).

    Tip 

    You can also click the Advanced button in the Create New Symbol dialog box to access Source options and set linkage when you first create a symbol in your project.

  3. The Select Source Symbol dialog box (shown in Figure 6-26) will open automatically to enable you to choose the specific symbol in the source Library that you want to link to the symbol in your current project file. Select a symbol in the source Library file list and click OK to close the Select Source Symbol dialog box.

  4. Before you close the Symbol Properties dialog box, notice that the path to the source file is now listed and that you can select a check box for Always update before publishing (as shown in Figure 6-27). Select this check box if you want Flash to check for changes in the source file and automatically update all linked symbols each time you publish an .swf from the project file.

  5. Click OK to close the Symbol Properties dialog box.

  6. The symbol name in your project Library will remain the same, but the content of the symbol in all instances used in your project file should now contain the updated content that will match the content of the symbol you chose in the source file.

  7. Save your project file to preserve the linkage information for your symbol.

image from book
Figure 6-25: Browsing for a source file in the Symbol Properties dialog box

image from book
Figure 6-26: The Select Source Symbol dialog box, where you specify a linked symbol

image from book
Figure 6-27: The source path shown in the Symbol Properties dialog box with the Always update before publishing check box selected

Should any changes be made to the content of the symbol in the source .fla, you can either publish an .swf from the project file to see Flash automatically check for changes and update all linked symbols (with the Always update before publishing check box selected in the Symbol Properties dialog box), or you can use the Update command to manually get the most recent version of the symbol into your project file before you publish an .swf. To see how this works, follow these steps:

  1. Open the source .fla and make some changes to the symbol (using Edit mode) that you originally linked to and then save and close the file. You can change the appearance of the symbol, but don't change the symbol name.

  2. Open a project file that contains the symbol you wish to update and either ensure that the Always update before publishing check box is selected in Symbol Properties before publishing an .swf to force Flash to check for changes to the source symbol and automatically update your project Library, or go to Step 3.

  3. Select the symbol in the Library and use the options menu or the contextual menu to select the Update command.

  4. In the Update Library Items dialog box (shown in Figure 6-28), select the symbol that you edited in the source Library and click the Update button.

  5. You will now see the content of the symbol in your project Library updated to reflect the changes made in the source file.

image from book
Figure 6-28: Use the Update Library Items dialog box to manually update the content of symbols in your project file.

It probably seems like more hassle than it's worth to keep content current in one or two files, but you will find it very helpful should you need to update symbols in multiple project files consistently.




Macromedia Flash 8 Bible
Macromedia Flash8 Bible
ISBN: 0471746762
EAN: 2147483647
Year: 2006
Pages: 395

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