384
Creating Multilanguage Text
By default, the Flash authoring application assumes that external files that use the
#include
action are encoded in the traditional code page of the operating system running the authoring
tool. Using the
//!-- UTF8
header in a file tells the authoring tool that the external file is
encoded as UTF-8.
To include multilanguage text using the #include action:
1.
In the Flash authoring tool, create a dynamic or input text field to display the text in the
document. For more information, see
Chapter 6, “Working with Text,” on page 157
.
2.
In the Property inspector, with the text field selected, assign an instance name to the text
field.
3.
Create a text file that defines the value for the text field variable. Remember to add the
header
//!-- UTF8
at the beginning of the file.
4.
Save the file in UTF-8 format.
5.
Use the
#include
directive to include the external file in the dynamic or input text field.
For more information, see
#include
directive in the
ActionScript 2.0 Language
Reference
.
Creating documents with multilanguage text using
text variables
You can include Unicode-encoded contents in text variables using the syntax
\uXXXX
, where
XXXX
is the four-digit hexadecimal code point, or
escape
character, for the Unicode character.
The Flash authoring tool supports Unicode escape characters through
\uFFFF
. To find the
code points for Unicode characters, refer to the Unicode Standard at
www.Unicode.org
.
You can use Unicode escape characters only in text field variables. You cannot include
Unicode escape characters in external text or XML files; Flash Player 6 does not recognize
Unicode escape characters in external files.
For example, to set a dynamic text field (with the instance name
myTextVar
) that contains
Japanese, Korean, Chinese, English, Hebrew, and Greek characters and the Euro sign, you can
enter the following:
myTextVar.text = "\u304B\uD55C\u6C49hello\u05E2\u03BB\u20AC";
When the SWF file plays, the following characters appear in the text field:
For best results when creating a text field that contains multiple languages, make sure to use a
font that includes all the glyphs your text needs. For more information, see
“Using external
text or XML files that are not Unicode-encoded” on page 385
.
Summary of Contents for FLASH 8-FLASH
Page 1: ...Using Flash ...
Page 12: ...12 Contents ...
Page 110: ...110 Using Symbols Instances and Library Assets ...
Page 128: ...128 Working with Color Strokes and Fills ...
Page 156: ...156 Drawing ...
Page 190: ...190 Working with Text ...
Page 224: ...224 Working with Graphic Objects ...
Page 270: ...270 Creating Motion ...
Page 310: ...310 Working with Video ...
Page 362: ...362 Working with Screens Flash Professional Only ...
Page 386: ...386 Creating Multilanguage Text ...
Page 454: ...454 Data Integration Flash Professional Only ...
Page 500: ...500 Publishing ...
Page 534: ...534 Creating Accessible Content ...