Unicode support for ActionScript

Macromedia Flash MX 2004 and Macromedia Flash MX Professional 2004 support Unicode text encoding for ActionScript. This means that you can include text in different languages in an ActionScript file. For example, you could include text in English, Japanese, and French in the same file.

You can set ActionScript preferences to specify the type of encoding to use when importing or exporting ActionScript files. You can select either UTF-8 encoding or Default Encoding. UTF-8 is 8-bit Unicode format; Default Encoding is the encoding form supported by the language your system is currently using, also called the traditional code page.

In general, if you are importing or exporting ActionScript files in UTF-8 format, use the UTF-8 preference. If you are importing or exporting files in the traditional code page in use on your system, use the Default Encoding preference.

If text in your scripts doesn't look as expected when you open or import a file, change the import encoding preference. If you receive a warning message when exporting ActionScript files, you can change the export encoding preference or turn this warning off in ActionScript preferences.

To select text encoding options for importing or exporting ActionScript files:

  1. In the Preferences dialog box (Edit > Preferences), click the ActionScript tab.
  2. Under Editing Options, do one or both of the following:
    • For Open/Import, select UTF-8 to open or import using Unicode encoding, or select Default Encoding to open or import using the encoding form of the language currently used by your system.
    • For Save/Export, select UTF-8 to save or export using Unicode encoding, or select Default Encoding to save or export using the encoding form of the language currently used by your system.

To turn the export encoding warning off or on:

  1. In the Preferences dialog box (Edit > Preferences), click the Warnings tab.
  2. Select or deselect Warn on Encoding Conflicts When Exporting .as Files.

Caution: The Test Movie command (see Debugging your scripts) will fail if any part of the SWF file path has characters that cannot be represented using the MBCS encoding scheme. For example, Japanese paths on an English system will not work. All areas of the application that use the external player are subject to this limitation.