Debugging Your Scripts - MACROMEDIA FLASH MX 2004-USING ACTIONSCRIPT IN FLASH Use Manual

Using actionscript in flash
Hide thumbs Also See for FLASH MX 2004-USING ACTIONSCRIPT IN FLASH:
Table of Contents

Advertisement

To select text encoding options for importing or exporting ActionScript files:
In the Preferences dialog box (Edit > Preferences), click the ActionScript tab.
1.
Under Editing Options, do one or both of the following:
2.
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:
In the Preferences dialog box (Edit > Preferences), click the Warnings tab.
1.
Select or deselect Warn on Encoding Conflicts When Exporting .as Files.
2.

Debugging your scripts

Flash provides several tools for testing ActionScript in your SWF files. The Debugger, discussed
in the rest of this section, lets you find errors in a SWF file while it's running in Flash Player. Flash
also provides the following additional debugging tools:
The Output panel, which shows error messages (including some runtime errors) and lists of
variables and objects (see
The
statement, which sends programming notes and values of expressions to the
trace
Output panel (see
The
and
throw
errors from within your script
You must view your SWF file in a special version of Flash Player called Flash Debug Player. When
you install the authoring tool, Flash Debug Player is installed automatically. So, if you install
Flash and browse a website that has Flash content, or do a Test Movie, you're using Flash Debug
Player. You can also run the installer in the Flash MX 2004 program\Players\Debug\ directory or
launch the stand-alone Flash Debug Player from the same directory.
When you use the Test Movie command to test SWF files that implement keyboard controls
(tabbing, keyboard shortcuts created using
Disable Keyboard Shortcuts. Selecting this option prevents the authoring environment from
"grabbing" keystrokes, and lets them pass through to the player. For example, in the authoring
environment, Control+U opens the Preferences dialog box. If your script assigns Control+U to an
action that underlines text onscreen, when you use Test Movie, pressing Control+U opens the
Preferences dialog box instead of running the action that underlines text. To let the Control+U
command pass through to the player, you must select Control > Disable Keyboard Shortcuts.
Caution: When using 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 using the MBCS encoding
scheme. For example, Japanese paths on an English system do not work. All areas of the application
that use the external player are subject to this limitation.
"Using the Output panel" on page
"Using the trace statement" on page 165
try..catch..finally
162)
)
statements, which let you test and respond to runtime
, and so on), select Control >
Key.addListener()
Debugging your scripts
153

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-USING ACTIONSCRIPT IN FLASH and is the answer not in the manual?

This manual is also suitable for:

Flash mx 2004 - actionscript

Table of Contents