Trace

Traces are like the 'print "Hello World' of the actionscript world. They enable you to see the processes going on beneath.

trace("HelloWorld"); // for when you want it to print the words "HelloWorld" in verbatim 

var HelloWorld:String = "Greetings!"; trace(HelloWorld); // for when you want it to print the value of the string/variable called "HelloWorld" // in this second case it will return "Greetings!" 

AS2

 * Create a new dynamic text field
 * Assign it an instance name (eg: textfieldName)

textfieldName.text = variableYouWantToTrace; // note that you do not put quotation marks for variables 