System.usecodepage - call external AS needs

xiaoxiao2021-03-06  131

System.usecodepage

Usability

Flash Player 6.

usage

System.usecodepage

Description

Attributes; a Boolean value, it notifies that Flash Player uses Unicode to explain the external text file, or use the traditional code page of the operating system running the player to explain the external text file. The default value of System.usePage is false.

When this property is set to false, the Flash Player interprets the external text file by Unicode. (When saving these files, you must encode it using Unicode.) When this property is set to TRUE, Flash Player uses the traditional code page of the operating system running the player to explain the external text file.

For text (using a #include command, loadvariables () or getURL action, or loadvars or XML objects, you must use Unicode to encode it when you use a text file, or a loadvars or xml object, so that Flash Player can identify it as Unicode. To encode external files using Unicode, save these files in an application that supports Unicode (for example, "Notepad" on Windows 2000).

If an external text file containing or loads a non-Unicode encoding, you should set System.useCodePage to True. In the first frame of the SWF file of the load data, add the following code (first line code) at the foremost:

System.usecodepage = true;

If there is this line of code, Flash Player will explain the external text using the traditional code page of the operating system running Flash Player. For English Windows operating systems, this code page is usually CP1252; for a Japanese operating system, the code page is usually Shift-JIS. If you set System.useCodePage to True, Flash Player 6, and later processes the text, the text is the same as Flash Player 5. (Flash Player 5 is deemed to use all text as the text of the traditional code page encoded by the operating system running the player.)

If you set System.useCodePage to True, you should note that the characters used in your external text file must be included in the traditional code page of the operating system running the player, so that the text can be displayed. For example, if you load an external text file containing Chinese characters, these characters will not be displayed on systems using the CP1252 code page because the code page does not contain Chinese characters.

To make sure that users on all platforms can view external text files used in your SWF file, you should use Unicode to encode all external text files and leave the System.useCodePage settings for its default setting FALSE. In this way, Flash Player 6 and later will explain the text by Unicode.

转载请注明原文地址:https://www.9cbs.com/read-126742.html

New Post(0)