Using a Trace Action

 < Day Day Up > 



Use a trace action to get a report about specific parts of your movie. Your queries are answered in the Output window. You can track things such as dead handlers, Movie Clip parameters, target paths, and so on. You can add a trace action to send the value of an expression to the Output window during Test Movie or Debug Movie modes. Select an object or frame in the Timeline, and open the Actions panel. You enter the trace action into the Actions panel like any other action. For instance, let's say you have an instance of a circle on stage with properties of color and an X position and you want to check the properties, you would type the following into the Actions panel in Expert mode:

mycircle = new circle (0x660000, 40);   trace (mycircle.color); //the trace return in the Output window would  be 660000 trace (mycircle.xPosition);  //the trace return would be 40

If you don't get a return, you know to check for errors.



 < Day Day Up > 



Macromedia Studio MX Bible
Macromedia Studio MX Bible
ISBN: 0764525239
EAN: 2147483647
Year: 2003
Pages: 491

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net