| Previous | Next | |
mProjector enables you to track the execution of your application using the trace methods: mApplication.trace(), mApplication.enableAutoTrace(), and mApplication.setTraceColor().
The mApplication.enableAutoTrace() method enables or disables automatic tracing of all mProjector commands. When auto tracing is enabled, mProjector will post mProjector function names and parameter values to the trace window. The mApplication.trace() method displays the specified text string in the trace window.
mProjector trace messaging will appear in the Flash IDE Output window if you include the mTracer component in the first frame of your movie. This tracing is limited to messages, parameters, and results provided from the Flash Player only. mProjector function return values are not avaliable in the Flash IDE.
For example, if you enable auto tracing, mProjector function calls and their corresponding parameter values sent to mProjector will appear in the Output window. If you were to call mWindow.setSize(x, y), where x=100 and y=200, you would see "mWindow.setSize(100, 200)" in the Output window. However, tracing an mProjector return value will show undefined or no message in the Output window. If you were to call mApplication.trace(mWindow.getSize().toString()), the corresponding line in the Output window would be "undefined".
NOTE: The mTracer component is not required for runtime functionality, but can be helpful by providing design time tracing. The component has no effect at runtime, and can be removed once development and testing is complete.
On Windows, the trace messages are posted to the TraceViewer application during execution of your application. The TraceViewer app ships and installs with mProjector Windows. You can launch TraceViewer from mProjector’s submenu in the Start Menu. The mWindow.setTraceColor() (Windows Only) sets a window’s custom trace color in TraceViewer. This color will be used by all trace commands issued by the window which made the call.

On the Mac, all trace messages are posted to the OSX Console application during execution. You can find the Console application in the Applications/Utilites directory.
| Questions or Feedback? | Previous | Next |