(See TraceManager (AS2) Update)

Finally I put some code up here:
“TraceManager.as”
“TraceManager Test.fla”

This is an AS file I put together for some big engine work. When your jamming together a lot of code and a big library of functions, it becomes difficult to keep track of what’s working and what’s breaking. For me, constantly turning traces on and off and having to figure out the meaning of traces that I wrote weeks (or even months) ago gets old fast.

Lately, my physics work has me running more functions than you can shake a stick at; functions within functions within functions, nesting like you wouldn’t believe. This leads to the most hideously complex tracing, almost nullifying the reason you trace data to begin with. So I put together this TraceManager to end such problems once and for all:

_________________________________________
Time(seconds): Depth: Function:
—————————————–
0
________________+0____function1 (test1){
0
________________+1________function2 (test1 1){
0
________________+2____________function3 (test1 1 2){
0
________________-2____________} function3—RESULT( test1 1 2 3 )
0
________________-1________} function2—RESULT( test1 1 2 3 )
0
________________-0____}function1—RESULT( test1 1 2 3 )

-This trace is from the example fla. It runs like so: function1 takes a string (“test1″) and adds a ” 1″ to it, then passes the result to function2; function2 adds a ” 2″ and passes the result to function3; function3 adds a ” 3″ to the string and returns it. Each function returns its own result to its parent function until all functions are complete.

Continue Reading…