|
Including localized text in a movie
While it's generally up to the localization team to work with special characters required of another language, you should be aware of the character encoding that Flash uses to display characters. On non-Japanese systems, Flash uses ISO 8859-1 (Latin-1), which is a standard that defines a character set (a one-to-one correspondence between a character and its numerical code) and character encoding (an algorithm that presents the character digitally by mapping the code number).
Note: If you're familiar with ASCII, note that Latin-1 is a superset, or extension, of 7-bit ASCII.
Flash uses the Latin-1 character set for both Windows and Macintosh operating systems and outputs the character set into SWF files.
The Japanese language requires a double-byte (16-bit) character set. If the Flash Player runs on a system where Japanese is the active codepage, Flash uses the Shift-JIS character set by checking for Shift-JIS lead bytes and, when they are encountered, treating the lead byte and the following byte as a single Shift-JIS double-byte character.
Including text from external files
You can design your movie to include text from external files. One of the easiest ways of accomplishing this is to use the loadVariables action to call the text files into dynamic text fields at run time. In the FLA file, you can specify text attributes, such as font style, size, and color, for the dynamic text field. An advantage of keeping text in external files is that the localization team then works with the text files, rather than the FLA file, to localize the text.
For an example of a Flash 5 movie that includes localized text from external files, download the Localization.fla, Localization.swf, and four text files:
Download the Windows source file flash5_localization.zip (59K)
Download the Macintosh source file flash5_localization.sea.hqx (82K)
After downloading the files, play Localization.swf. The movie includes static text, text in a dynamic field, and text input fields.

The four buttons at the top of the SWF window include gotoAndStop actions. When you click one of these buttons, the button action causes the playhead to move to the frame in the Timeline, specified by gotoAndStop , that corresponds to the language on the button. That frame includes a frame action, loadVariables , which names the external text file it's sending to the dynamic text field.
To view the ActionScript associated with the movie, open the Localization.fla file.
In the Timeline, select frames 1, 10, 20, and 30 to see where a different language begins. |