Output panel overview, Navigate to errors in code, List a swf file’s objects and variables – Adobe Flash Professional CS3 User Manual

Page 414

Advertising
background image

FLASH CS3

User Guide

408

Warnings Mode causes extra warnings to be reported that are useful for discovering incompatibilities when
updating ActionScript 2.0 code to ActionScript 3.0.

Output panel overview

When you test a SWF file, the Output panel can show information to help you troubleshoot your SWF file. To show
this information, add

trace()

statements to your code or use the List Objects and List Variables commands.

If you use the

trace()

statement in your scripts, you can send specific information to the Output panel as the SWF

file runs. This could include notes about the SWF file’s status or the value of an expression. For more information,
see the

trace()

function in the ActionScript 2.0 Language Reference.

Display or hide the Output panel

Select Window > Output or press F2.

Work with the contents of the Output panel

In the Output Panel menu

, select a command. Here is a partial list:

Copy

Copies all the contents of the Output panel to the computer's Clipboard. To copy a selected portion of the

output, select the area you want to copy and then select Copy.

Save To File

Saves the Output panel contents to a text file.

Filter Level

Select None to prevent any information from appearing in the Output panel; select Verbose to send all

information to the Output panel.

Navigate to errors in code

When Flash encounters an error in ActionScript code, either during compiling or execution, it reports the error in
the Compiler Errors panel. From the Compiler Errors panel, you can navigate to the line of code that caused the
error.

Double click the error in the Compiler Errors panel.

List a SWF file’s objects and variables

To list a SWF file’s objects, use the List Objects command, which is useful for finding the correct target path and
instance names. To list a SWF file’s variables, use the List Variables command, with which you can find a variable’s
name and target path.

Selecting the List Objects or List Variables command clears the contents of the Output panel. If you do not want to
lose this information, select Save to File from the Output Panel menu before selecting the command.

List a SWF file’s objects

In the test environment, the List Objects command shows the level, frame, object type (shape, movie clip, or button),
target paths, and instance names of movie clips, buttons, and text fields in a hierarchical list in the Output panel. (It
does not show all ActionScript data objects.)

1

If your SWF file is not running in the test environment, select Control > Test Movie.

2

Select Debug > List Objects.

Advertising