Adobe 38039336 - Flash CS3 Professional User Manual page 404

User guide
Hide thumbs Also See for 38039336 - Flash CS3 Professional:
Table of Contents

Advertisement

Check syntax and punctuation
You can do a quick check of your ActionScript code without publishing the FLA file.
When you check syntax, the current script is checked. If the current script calls ActionScript classes, those classes
are compiled and their syntax is also checked. Other scripts that might be in the FLA file are not checked.
Check syntax
• In the Actions panel or Script window, click Check Syntax
• From the panel menu
• Click in the Script pane, and then press Control+T (Windows) or Command+T (Macintosh).
Syntax errors are listed in the Compiler Errors panel.
Note: In an external ActionScript class file in the Script window, the global classpath affects the syntax check. Even if the
global classpath is set correctly, you might generate errors, because the compiler is not aware that this class is being
compiled. For more information about ActionScript 3.0 classes, see Classes in Programming ActionScript 3.0. For more
information on compiling ActionScript 2.0 classes, see Compiling and exporting classes in Learning ActionScript 2.0 in
Adobe Flash.
Check for punctuation balance
Click between braces {}, brackets [], or parentheses () in your script.
1
2
In Windows, press Control+' (single quote); on the Macintosh, press Command+' (single quote). The text between
braces, brackets, or parentheses is highlighted, and you can check that opening punctuation has corresponding
closing punctuation.
Encoding for imported and exported scripts
You can set ActionScript preferences to specify the type of encoding to use in imported or exported ActionScript
files. UTF-8 Encoding is 8-bit Unicode format, which lets you include text in multiple languages in your file; Default
Encoding is the encoding supported by the language your system is currently using, also called the traditional code
page.
Important: When you use a non-English application on an English system, the Test Movie command fails if any part of
the SWF file path has characters that cannot be represented by 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. Be sure to use
English-only path names on English systems. All areas of the application that use the Test Movie player are subject to this
limitation.
Import and export scripts
You can import a script into the Actions panel or Script window. You can also export your scripts from the Actions
panel to external ActionScript files. (When you use the Script window, exporting is unnecessary because you can
instead save the AS file.)
If text in your scripts doesn't look as expected when you open or import a file, change the import encoding
preference.
Import an external AS file
In the Script pane, place the insertion point where you want to locate the first line of the external script.
1
(at the upper-right corner of the Actions panel), select Check Syntax.
.
FLASH CS3
398
User Guide

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash cs3 professional

Table of Contents