MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT Reference Manual page 75

Actionscript reference guide
Hide thumbs Also See for FLASH MX 2004 - ACTIONSCRIPT:
Table of Contents

Advertisement

You can set breakpoints in the Actions panel or in the Debugger. (To set breakpoints in external
scripts, you must use the Debugger.) Breakpoints set in the Actions panel are saved with the Flash
document (FLA file). Breakpoints set in the Debugger are not saved in the FLA file and are valid
only for the current debugging session.
To set or remove a breakpoint in the Actions panel, do one of the following:
Click in the left margin. A red dot indicates a breakpoint.
Click the Debug options button above the Script pane.
Right-click (Windows) or Control-click (Macintosh) to display the context menu, and select
Breakpoint, Remove Breakpoint, or Remove All Breakpoints.
Press Control+Shift+B (Windows) or Command+Shift+B (Macintosh).
Note: In previous versions of Flash, clicking in the left margin of the Script pane selected the line of
code; now it adds or removes a breakpoint. To select a line of code, use Control-click (Windows) or
Command-click (Macintosh).
To set and remove breakpoints in the Debugger, do one of the following:
Click in the left margin. A red dot indicates a breakpoint.
Click the Toggle Breakpoint or Remove All Breakpoints button above the code view.
Right-click (Windows) or Control-click (Macintosh) to display the context menu, and select
Breakpoint, Remove Breakpoint, or Remove All Breakpoints.
Press Control+Shift+B (Windows) or Command+Shift+B (Macintosh).
Once Flash Player is stopped at a breakpoint, you can step into, step over, or step out of that
line of code. If you set a breakpoint in a comment or on an empty line in the Actions panel, the
breakpoint is ignored.
Stepping through lines of code
When you start a debugging session, Flash Player is paused. If you set breakpoints in the Actions
panel, you can simply click the Continue button to play the SWF file until it reaches a
breakpoint. For example, in the following code, suppose a breakpoint is set inside a button on the
line
myFunction()
on(press){
myFunction();
}
When you click the button, the breakpoint is reached and Flash Player pauses. You can now step
in to bring the Debugger to the first line of
document. You can also step through or out of the function.
If you didn't set breakpoints in the Actions panel, you can use the jump menu in the Debugger to
select any script in the movie. Once you've selected a script, you can add breakpoints to it. After
adding breakpoints, you must click the Continue button to start the movie. The Debugger stops
when it reaches the breakpoint.
:
wherever it is defined in the
myFunction()
Debugging your scripts
75

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Subscribe to Our Youtube Channel

Table of Contents