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.