EasyManua.ls Logo

MACROMEDIA FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH - Page 720

MACROMEDIA FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH
830 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
720 Debugging Applications
To modify a property value:
Double-click the value, and enter a new value.
The value cannot be an expression. For example, you can enter 50 or "clearwater", but
you cannot enter x + 50. The value can be a string (any value surrounded by quotation
marks [""]), a number, or a Boolean value (
true or false). You cant enter object or array
values (for example,
{id: "rogue"} or [1, 2, 3]) in the Debugger.
Setting and removing breakpoints
A breakpoint lets you stop a Flash application running in Flash Debug Player at a specific line
of ActionScript. You can use breakpoints to test possible trouble spots in your code. For
example, if youve written a set of
if..else if statements and cant determine which one is
executing, you can add a breakpoint before the statements and examine them one by one in
the Debugger.
You can set breakpoints in the Actions panel, Script window, or in the Debugger. Breakpoints
set in the Actions panel are saved with the FLA file. Breakpoints set in the Debugger and
Script window 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 or Script window during a
debugging session, 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 Set Breakpoint, Remove Breakpoint, or Remove Breakpoints in this File.
NOTE
To write the value of an expression to the Output panel in test mode, use the trace
statement. See “Using the trace statement” on page 728.
CAUTION
If you set breakpoints in the Actions panel or Script window and press the Auto Format
button, you might notice that some breakpoints are no longer in the correct location.
ActionScript might be moved to a different line when your code is formatted because
sometimes empty lines are removed. You might need to check and modify your
breakpoints after you click Auto Format, or to auto format your scripts before you set
breakpoints.
NOTE
In the Script window, you can also select Remove Breakpoints in all AS Files.

Table of Contents

Related product manuals