« Return to Thread: NEED HELP with mtasc trace option

NEED HELP with mtasc trace option

by Selene Platt :: Rate this Message:

Reply to Author | View in Thread


Hello,

I am using mtasc as an actionscript 2.0 compiler and want to add the -trace
option.  However, I'm not sure how to implement my own trace function.  The
example given on the web ( http://www.mtasc.org/#trace ) doesn't exactly
show where MyClass.myTrace() is defined and what it looks like.  Could
someone provide an example assuming I have the following already in place:

class myClass
{
    public static function main(root) {

    (in here, I access a flash shared object:
     myFlashObject = SharedObject.getLocal(root.FO_VAL);
    ... And so forth )

    ultimately calling the javascript callback function:
    getURL("javascript:setValue('" + ret_val + "')");
}

There are 3 input parameters on the SWF call, which I refer to as root.a,
root.b, and root.c based on precompiled #DEFINE's.

I want to trace the value of the params and ret_val.  Should I define a
separate class for the trace function?  What code should it contain that
will actually print out the values I need?

Also, if I am debugging in Firebug (in Firefox), for example, where should I
expect these trace messages to come out -- in the browser window, in the
firebug console, or where?

I am really under the gun here...my swf was working and suddenly stopped
during a major test cycle that depends on my code.  So I would greatly
appreciate a fast response if someone has some info. Thanks very much,

Selene


--
MTASC : no more coffee break while compiling

 « Return to Thread: NEED HELP with mtasc trace option