The global trace() function is probably the simplest, and most useful methods of debugging that ActionScript developers have. Usually, it's used to output the value of a variable or to broadcast out a little note that some event occurred. Most people use it something like this:

  1. trace ("myVar: " + myVar); // outputs value of myVar
  2.  
  3. if (somethingGood) {
  4.         trace ("something good just happened!");
  5. } else {
  6.         trace ("Houston, we have a problem!");
  7. }

Well, now in AS 3.0, trace() has been modified to allow multiple parameters! What's so cool about that? Well...

Instead of this:

  1. trace ("user name: " + lastName + ", " + firstName);

you can do this:

  1. trace ("user name:", lastName, firstName);

Or, simply output a list of variables all at once instead of using multiple trace() calls:

  1. trace (address1, city, state, zip);

Not exactly earth shattering, but it's definitely a welcome addition to ActionScript.