ssCore.App.trace

Send information to the SWF Studio trace window.


Availability:

First available in version 3.0 build 2039.


Input Parameters:

text - A text string to be displayed in the trace window.

color - [Optional] - A color in #rrggbb format that will be applied to the text in the trace window to make it easy to find.


Output Parameters:

No output parameters.


Asynchronous Mode:

When this method is called asynchronously, a return object containing the output parameters is passed to the specified callback function.

ssCore.App.trace( paramsObject [, callbackParamsObject] [, errorParamsObject] );


Synchronous Mode:

When this method is called synchronously, a return object containing the output parameters is returned to the caller immediately.

var returnObject = ssCore.App.trace( paramsObject );


Notes:

If the SWF Studio IDE is not open when App.trace is called, the trace message will not be sent. This means you can keep trace messages in your code during development (and even after deployment) without adding a lot of overhead.


Examples:

The following example will display two messages in the SWF Studio Trace tab. The first message is displayed in the default colour. The second is forced to be displayed as blue.

ssCore.App.trace({text:"Hello World"});
ssCore.App.trace({text:"This is a trace message", color:"#0000FF"});