You must include the following header as the first line of the file, to identify the file as Unicode to
the Flash authoring tool:
//!-- UTF8
Note: Be sure to include a space after the second dash (-).
By default, the Flash authoring application assumes that external files that use the
action are encoded in the traditional code page of the operating system running the authoring
tool. Using the
//!-- UTF8
encoded as UTF-8.
To include multilanguage text using the #include action:
In the Flash authoring tool, create a dynamic or input text field to display the text in the
1.
document. For more information, see
In the Property inspector, with the text field selected, assign an instance name to the text field.
2.
Create a text file that defines the value for the text field variable. Remember to add the header
3.
//!-- UTF8 at the beginning of the file.
Save the file in UTF-8 format.
4.
Use the
5.
#include
information, see
Creating documents with multilanguage text using text variables
You can include Unicode-encoded contents in text variables using the syntax
is the four-digit hexadecimal code point, or escape character, for the Unicode character. The Flash
authoring tool supports Unicode escape characters through
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 variable name
Japanese, Korean, Chinese, English, Hebrew, and Greek characters and the Euro sign, you can
enter the following:
myTextVar = "\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
XML files that are not Unicode encoded" on page
250
Chapter 13: Creating Multilanguage Text
header in a file tells the authoring tool that the external file is
Chapter 6, "Working with Text," on page
action to include the external file in the dynamic or input text field. For more
in Flash ActionScript Language Reference.
#include
. To find the code points for
\uFFFF
myTextVar
"Using external text or
251.
#include
105.
, where
\uXXXX
XXXX
) that contains
Need help?
Do you have a question about the FLASH MX 2004-USING FLASH and is the answer not in the manual?