User Guide
118 Chapter 3: Using Best Practices
You cannot use any classes until the playhead reaches the frame you choose to load them into.
Because components require classes for their functionality, you must load components after the
Export frame for ActionScript 2.0 classes. If you export for Frame 3, you cannot use anything
from those classes until the playhead reaches Frame 3 and loads the data.
If you want to preload a file that uses components, you must preload the components in the SWF
file. To accomplish this, you must set your components to export for a different frame in the SWF
file. By default, the UI components export in Frame 1 of the SWF file.
To change the frame into which components export:
1.
Select Window > Library to open the Library panel.
2.
Right-click (Windows) or Control-click (Macintosh) the component in the library.
3.
Select Linkage from the context menu.
4.
Deselect Export in first frame.
5.
Click OK.
6.
Select File > Publish Settings.
7.
Select the Flash tab, and click the Settings button.
8.
Enter a number into the Export frame for classes text box. The classes will load into this frame.
9.
Click OK.
If components do not load on the first frame, you can create a custom progress bar for the first
frame of the SWF file. Do not reference any components in your ActionScript or include any
components on the Stage until you load the classes for the frame you specified in Step 7.
Caution: Components must be exported after the ActionScript classes that they use.
Working with text
Computer systems have a specific code page that is regional. For example, a computer in Japan
has a different code page than a computer in England. Flash Player 5 and earlier versions relied on
the code page to display text; Flash Player 6 and later versions use Unicode to display text.
Unicode is more reliable and standardized for displaying text because it is a universal character set
that contains characters for all languages. Most current applications use Unicode.
You can use Unicode escape sequences to display special characters in Flash Player 6. However, it
is possible that not all your characters display correctly if you do not load text that is UTF-8 or
UTF-16 encoded (Unicode) or if you do not use a Unicode escape sequence to display the special
character. For a set of Unicode code charts, see www.unicode.org/charts. For a list of commonly
used escape sequences, see the table at the end of this section.
A non-Unicode application uses the operating system’s code page to render characters on a page.
In this case, the characters you see are specified by the code page, so the characters appear
correctly only when the code page on the user’s operating system matches the application’s code
page. This means that the code page that was used to create the SWF file needs to match the code
page on the end user’s computer. Using code pages is not a good idea for applications that might
be used by an international audience; in this case, use Unicode instead.