728
Debugging Applications
About displaying text field properties for debugging
To obtain debugging information about TextField objects, you can use the Debug > List
Variables command in test mode. The Output panel uses the following conventions to show
TextField objects:
■
If a property is not found on the object, it does not appear.
■
No more than four properties appear on a line.
■
A property with a string value appears on a separate line.
■
If any other properties are defined for the object after the built-in properties are processed,
they are added to the display by using the rules in the second and third points of this list.
■
Color properties appear as hexadecimal numbers (0x00FF00).
■
The properties appear in the following order:
variable
,
text
,
htmlText
,
html
,
textWidth
,
textHeight
,
maxChars
,
borderColor
,
backgroundColor
,
textColor
,
border
,
background
,
wordWrap
,
password
,
multiline
,
selectable
,
scroll
,
hscroll
,
maxscroll
,
maxhscroll
,
bottomScroll
,
type
,
embedFonts
,
restrict
,
length
,
tabIndex
,
autoSize
.
The List Objects command in the Debug menu (during test mode) lists TextField objects. If
an instance name is specified for a text field, the Output panel shows the full target path
including the instance name in the following form:
Target = "
target path
"
For more information on the List Variables or List Objects command, see
“Using the Output
panel” on page 724
.
Using the trace statement
When you use the
trace
statement in a script, you can send information to the Output
panel. For example, while testing a SWF file or scene, you can send specific programming
notes to the panel or have specific results appear when a button is pressed or a frame plays.
The
trace
statement is similar to the JavaScript
alert
statement.
When you use the
trace
statement in a script, you can use expressions as parameters. The
value of an expression appears in the Output panel in test mode, as shown by the following
code snippet and image of the Output panel.
Summary of Contents for FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH
Page 1: ...Learning ActionScript 2 0 in Flash...
Page 8: ...8 Contents...
Page 18: ...18 Introduction...
Page 30: ...30 What s New in Flash 8 ActionScript...
Page 66: ...66 Writing and Editing ActionScript 2 0...
Page 328: ...328 Interfaces...
Page 350: ...350 Handling Events...
Page 590: ...590 Creating Interaction with ActionScript...
Page 710: ...710 Understanding Security...
Page 730: ...730 Debugging Applications...
Page 780: ...780 Deprecated Flash 4 operators...
Page 830: ...830 Index...