722
Debugging Applications
An example of the AsBreakpoints.xml is as follows:
<?xml version="1.0"?>
<flash_breakpoints version="1.0">
<file name="c:\tmp\myscript.as">
<breakpoint line="10"></breakpoint>
<breakpoint line="8"></breakpoint>
<breakpoint line="6"></breakpoint>
</file>
<file name="c:\tmp\myotherscript.as">
<breakpoint line="11"></breakpoint>
<breakpoint line="7"></breakpoint>
<breakpoint line="4"></breakpoint>
</file>
</flash_breakpoints>
The XML file consists of the following tags:
flash_breakpoints
This node has an attribute, called
version
, that indicates the version of
the XML file. Flash 8 is version 1.0.
file
A child node of
flash_breakpoints
. This node has one attribute, called
name
, that
indicates the name of the file that contains breakpoints.
breakpoint
A child node of
file
. This node has an attribute, called
line
, that indicates the
line number where the breakpoint exists.
The AsBreakpoints.xml file is read when you launch Flash, and generated again when you
shut down Flash. AsBreakpoints.xml is used to keep track of the breakpoints between Flash
development sessions. An internal data structure maintains the breakpoints as you set and
remove them while developing in Flash.
About working through lines of code
When you start a debugging session, Flash Player is paused so that you can toggle breakpoints.
If you set breakpoints in the Actions panel, you can click Continue to play the SWF file until
it reaches a breakpoint. 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 SWF file. When you have selected a
script, you can add breakpoints to it.
After adding breakpoints, you must click Continue to start the SWF file. The Debugger stops
when it reaches the breakpoint. For example, in the following code, suppose a breakpoint is
set inside a button on the
myFunction()
line:
on(press){
myFunction();
}
Содержание FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH
Страница 1: ...Learning ActionScript 2 0 in Flash...
Страница 8: ...8 Contents...
Страница 18: ...18 Introduction...
Страница 30: ...30 What s New in Flash 8 ActionScript...
Страница 66: ...66 Writing and Editing ActionScript 2 0...
Страница 328: ...328 Interfaces...
Страница 350: ...350 Handling Events...
Страница 590: ...590 Creating Interaction with ActionScript...
Страница 710: ...710 Understanding Security...
Страница 730: ...730 Debugging Applications...
Страница 780: ...780 Deprecated Flash 4 operators...
Страница 830: ...830 Index...