Troubleshooting ActionScript > Using the Output window > Using trace

Using trace

When you use the trace action in a script, you can send information to the Output window. For example, while testing a movie or scene, you can send specific programming notes to the window or have specific results appear when a button is pressed or a frame is played. The trace action is similar to the JavaScript alert statement.

When you use the trace action in a script, you can use expressions as arguments. The value of an expression is displayed in the Output window in test-movie mode, as in the following:

onClipEvent(enterFrame){
	trace("onClipEvent enterFrame " + enterFrame++)
}

The trace action returns values that are displayed in the Output window.