Flash Player 4.
trace(expression)
expression An expression to evaluate. When a SWF file is opened in the Flash authoring tool (using the Test Movie command), the value of the expression parameter is displayed in the Output panel.
Nothing.
Statement; evaluates the expression and displays the result in the Output panel in test mode.
Use this statement to record programming notes or to display messages in the Output panel while testing a SWF file. Use the expression parameter to check whether a condition exists, or to display values in the Output panel. The trace() statement is similar to the alert function in JavaScript.
You can use the Omit Trace Actions command in the Publish Settings dialog box to remove trace() actions from the exported SWF file.
The following example uses a trace() statement to display in the Output panel the methods and properties of the dynamically created text field called error_txt:
this.createTextField("error_txt", this.getNextHighestDepth(), 0, 0, 100, 22);for (var i in error_txt) {trace("error_txt."+i+" = "+error_txt[i]);}/* output:error_txt.styleSheet = undefinederror_txt.mouseWheelEnabled = trueerror_txt.condenseWhite = false...error_txt.maxscroll = 1error_txt.scroll = 1*/
RSS feed | Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/mx2004/main_7_2/00001862.html
Comments
No screen name said on Feb 15, 2005 at 2:22 AM : JesterXL said on Mar 1, 2005 at 5:49 AM : protosp said on Apr 1, 2005 at 1:06 PM : blagus said on Apr 8, 2005 at 9:32 AM : No screen name said on Apr 26, 2005 at 12:07 PM : No screen name said on Aug 17, 2005 at 2:22 AM :