Programming Habits: Using Trace Statements

Trace Statements

Its a great practice to utilize the trace statements if you arent already. A trace statement is used by programmers to test functionality or debug their script. The trace statement IS NOT seen once your swf has been published for the web or viewed outside of flash. Meaning no one will see it when viewing your flash project online. This is the primary reason my flash notes all include a dynamic text box. Normally I would just use a trace statement, but if I did that users would be unable see to the the result of given example. Furthermore, it might better suit you to skip making a dynamic textbox and just use a trace command.

Actionscript:

trace("this is a simple trace statement");

Result:

traceoutput

Leave a Reply