User Guide
152 Chapter 4: Writing and Debugging Scripts
To use automatic indentation:
• Automatic indentation is turned on by default. To turn it off, deselect Automatic indentation
in ActionScript preferences.
When automatic indentation is turned on, the text you type after
( or { is automatically
indented according to the Tab size setting in ActionScript preferences. To indent another line,
select the line and press Tab. To remove the indent, select the line and press Shift+Tab.
To enable or disable line numbers and word wrap:
Do one of the following:
• From the View Options pop-up menu, enable or disable View Line Numbers and Word Wrap.
• From the Actions panel Options pop-up menu, enable or disable View Line Numbers and
Word Wrap.
• With the pointer focused in the Script pane, press Control+Shift+L (Windows) or
Command+Shift+L (Macintosh) to enable or disable word wrap.
• With the pointer focused in the Script pane, press Control+Shift+W (Windows) or
Command+Shift+W (Macintosh) to enable or disable line numbers.
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 can include text in English, Japanese, and French in the same
file.
Caution: When using a non-English application on an English system, the Test Movie command (see
“Debugging your scripts” on page 153) fails if any part of the SWF file path has characters that
cannot be represented using the Multibyte Character Sets (MBCS) encoding scheme. For example,
Japanese paths, which work on a Japanese system, won’t work on an English system. All areas of the
application that use the external player are subject to this limitation.
You can set ActionScript preferences to specify the type of encoding to use when importing or
exporting ActionScript files. You can select 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.