Using external text or XML files that are not Unicode-encoded
385
Using external text or XML files that are
not Unicode-encoded
If you load external files into a Flash Player 7 application that are not Unicode-encoded, the
text in the external files does not appear correctly when Flash Player attempts to show them as
Unicode. You can tell Flash Player to use the traditional code page of the operating system
that is running the player. To do this, add the following code as the first line of code in the
first frame of the Flash application that is loading the data:
system.useCodepage = true;
Set the
system.useCodepage
property only once in a document; do not use it multiple times
in a document to make the player interpret some external files as Unicode and some as other
encoding because this can yield unexpected results.
If you set the
system.useCodepage
property to
true
, remember that the traditional code
page of the operating system running the player must include the glyphs used in your external
text file for the text to appear. For example, if you load an external text file that contains
Chinese characters, those characters do not appear on a system that uses the CP1252 code
page because that code page does not include Chinese characters. To ensure that users on all
platforms can view external text files used in your Flash applications, you should encode all
external text files as Unicode and leave the
system.useCodepage
property set to
false
by
default. This causes Flash Player to interpret the text as Unicode. For more information, see
useCodepage (System.useCodepage property) in the
ActionScript 2.0
Language Reference.
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 ...