03.05.2013 Views

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

useCodepage (System.useCodepage property)<br />

public static useCodepage : Boolean<br />

A Boolean value that tells Flash Player whether to use Unicode or the traditional code page of<br />

the operating system running the player to interpret external text files. The default value of<br />

System.useCodepage is false.<br />

■ When the property is set to false, Flash Player interprets external text files as Unicode.<br />

(These files must be encoded as Unicode when you save them.)<br />

■ When the property is set to true, Flash Player interprets external text files using the<br />

traditional code page of the operating system running the player.<br />

Text that you load as an external file (using the loadVariables() or getURL() statements, or<br />

the LoadVars class or XML class) must be encoded as Unicode when you save the text file in<br />

order for Flash Player to recognize it as Unicode. To encode external files as Unicode, save the<br />

files in an application that supports Unicode, such as Notepad on Windows 2000.<br />

If you load external text files that are not Unicode-encoded, you should set<br />

System.useCodepage to true. Add the following code as the first line of code in the first<br />

frame of the SWF file that is loading the data:<br />

System.useCodepage = true;<br />

When this code is present, Flash Player interprets external text using the traditional code page<br />

of the operating system running Flash Player. This is generally CP1252 for an English<br />

Windows operating system <strong>and</strong> Shift-JIS for a Japanese operating system. If you set<br />

System.useCodepage to true, Flash Player 6 <strong>and</strong> later treat text as Flash Player 5 does. (Flash<br />

Player 5 treated all text as if it were in the traditional code page of the operating system<br />

running the player.)<br />

If you set System.useCodepage to true, remember that the traditional code page of the<br />

operating system running the player must include the characters used in your external text file<br />

in order for the text to display. For example, if you load an external text file that contains<br />

Chinese characters, those characters cannot display on a system that uses the CP1252 code<br />

page because that code page does not include Chinese characters.<br />

To ensure that users on all platforms can view external text files used in your SWF files, you<br />

should encode all external text files as Unicode <strong>and</strong> leave System.useCodepage set to false by<br />

default. This way, Flash Player 6 <strong>and</strong> later interprets the text as Unicode.<br />

TextField<br />

Object<br />

|<br />

+-TextField<br />

608 ActionScript classes

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!