Fonts For Unicode-Encoded Text - MACROMEDIA FLASH MX 2004-USING FLASH Use Manual

Hide thumbs Also See for FLASH MX 2004-USING FLASH:
Table of Contents

Advertisement

Text encoding in Flash Player 7
By default, Flash Player 7 assumes that all text it encounters is Unicode encoded. If your
document loads external text or XML files, the text in these files should be UTF-8 encoded. You
can create these files using the Strings panel or in a text or HTML editor, such as Macromedia
Dreamweaver MX 2004, that can save the files in Unicode format.
Flash Player 7 supports the 8-bit Unicode format UTF-8, and the 16-bit Unicode formats
UTF-16 BE (Big Endian) and UTF-16 LE (Little Endian). For more information, see
encoding formats supported by Flash Player" on page
Unicode encoding formats supported by Flash Player
When reading text data in Flash, Flash Player looks at the first two bytes in the file to detect a byte
order mark (BOM), a standard formatting convention used to identify the Unicode encoding
format. If no BOM is detected, the text encoding is interpreted as UTF-8 (an 8-bit encoding
format). It is recommended that you use UTF-8 encoding in your applications.
If Flash Player detects either of the following BOMs, the text encoding format is interpreted
as follows:
If the first byte of the file is OxFE and the second is OxFF, the encoding is interpreted as UTF-
16 BE (Big Endian). This is used for Macintosh operating systems.
If the first byte of the file is OxFF and the second is OxFE, the encoding is interpreted as
UTF-16 LE (Little Endian). This is used for Windows operating systems.
Most text editors that can save files in UTF-16BE or LE automatically add the BOMs to the files.
Note: If you set the
code page of the operating system that is running the player; it is not interpreted as Unicode. For
more information, see
About encoding in external XML files
You cannot change the encoding of an XML file by changing the encoding tag. Flash Player
identifies the encoding of an external XML file using the same rules as for all external files: If no
BOM is encountered at the beginning of the file, the file is assumed to be in UTF-8 encoding. If
a BOM is encountered, the file is interpreted as UTF-16BE or LE. For more information, see
"Unicode encoding formats supported by Flash Player" on page

Fonts for Unicode-encoded text

When you use external files that are Unicode encoded, your users must have access to fonts
containing all the glyphs used in your text files. By default, Flash MX 2004 stores the names of
fonts used in dynamic or input text files. During SWF file playback, Flash Player 7 (and earlier
versions) looks for those fonts on the operating system running the player.
If the text in a SWF file contains glyphs that are not supported by the specified font, Flash Player
7 attempts to locate a font on the user's system that supports those glyphs. It is not always possible
for the player to locate an appropriate font. The behavior of this function depends on the fonts
available on the user's system as well as on the operating system running Flash Player.
property to
system.useCodepage
"Using external text or XML files that are not Unicode encoded" on page
237.
, the text is interpreted using the traditional
true
237.
Fonts for Unicode-encoded text
"Unicode
251.
237

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash mx 2004 - actionscript

Table of Contents