[AS3 SNIPPET] Who called my actionscript method?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | function methodToCall():void { calledMethod(); } function calledMethod():void { try { throw new Error("my error"); } catch (e:Error) { trace(e.getStackTrace()); } } methodToCall(); |
Source: http://blog.comtaste.com/2008/11/how_to_know_who_called_my_acti.html
Awesome! I couldn’t figure out where my function was being called from but this saved my life.
thanks.