Normally, Flash embeds the fonts you use within each published Flash movie. To avoid embedding the same font in multiple movies, you can create a special type of shared library element: the font symbol . Shared font symbols help you keep movie files smaller and make download times faster for your users. The first step in setting up a shared font is creating a font symbol in a library; then you set the symbol's linkage properties just as you would for any other shared asset. To create a font symbol: -
Open the file containing symbols that you defined as shared in the preceding exercises (ItemsToShare.fla). -
Open the file's Library window (choose Window > Library). The LibraryItemsToShare.fla window opens. -
From the Options menu in the top-right corner of the Library window, choose New Font (Figure 6.53). Figure 6.53. From the Library window of the file where you are defining shared assets, choose Options > New Font to create a new font symbol. The Font Symbol Properties dialog box appears. Flash gives the symbol a default name for example, Font 1 (Figure 6.54). Figure 6.54. Flash assigns a default name to Font symbols in the Font Symbol Properties dialog box (top). You rename the font symbol and select a font for it (bottom). -
Enter a new name for the font if you want. -
To specify which font is to be shared, do one of the following: -
In the Font field, enter the name of the font you want to be able to share. -
Click the triangle to the right of the field and choose a font from the drop-down menu. -
Click OK. As with other shared library symbols, you define a font symbol as a shared asset by setting its linkage properties and by publishing the library in a .swf file. To define a font symbol as a shared asset: -
Open the source movie containing the font symbol you want to use (ItemsToShare.fla). -
To set linkage properties for a font symbol, follow steps 2 through 9 in "To define symbols as shared for run time" earlier in this chapter, using the font symbol as your selected symbol. -
To publish the library in a .swf file, follow the steps in "To make shared symbols available to other movies during playback" earlier in this chapter. To use a font symbol in another movie: -
Follow steps 1 through 3 in "To add shared run-time symbols to your movie" earlier in this chapter, using the font symbol as your selected symbol. -
Make the destination file (UsingShared Items.fla) the active movie. -
In the Toolbox, select the Text tool. -
Access the Text Tool Property Inspector. If the Property Inspector is not open, choose Window > Properties. -
From the inspector's Font menu, choose the name of the shared font symbol (Figure 6.55). Figure 6.55. To use a font symbol in a movie, choose it from the Font menu in the Property Inspector. The asterisk following a name in the font list indicates that the font is a font symbol. In font lists, an asterisk follow the name of a font symbol. -
On the Stage, using the Text tool, create new text in the shared font. |