Hi list,
I've been dabbling in the black art of wrapping function calls today, and
seeing the list is now and then visited by questions on how to trace
function names for functions being called and how to insert and take out
debug statements, I've decided to post this here, hopefully it's of use t
Thanks, these are all very useful suggestions. Unfortunately the
3rd-party swf did seem to break when I tried loading it into my own
flash movie so xray may not work for me. xflas2 is interesting in
that having a general reflection API would be useful in other
contexts.
-- Vishal
On 9/29/06,
and xray uses Hans class resolver ;)
I've had this situation before as well, and what I did was create a base
flash movie that loaded the 3rd parties SWF in. Xray was in the library and
ready to inspect their swf. THe only problem with that is something might
break since now, that swf isn't at
Hi,
there are different options, i think as2lib has some kind of AOP mechanisms,
allowing you to add aspects to your code, eg a logging aspect. Not entirely
sure about this but i think in this case it would come down to walking the
global tree, through all classes (assuming everything is as2), wal
Hi,
try this:
function wrapper(obj:Object, prop:String):Void {
var f:Function = Function(obj[prop]);
obj[prop] = function() {
trace("{function: prop args: "+arguments+"}");
return f.apply(obj, arguments);
}
}
Let's say you want to "wrap" around the function Kite.fly:
wrapper(Kite, "fl
I am trying to debug a third-party flash movie (so I don't have direct
access to the code, but I can ask them to add small snippets). What I
would like to be able to do is to trace the name of a function/method
and the arguments it is passed upon invocation of that function. I
need to be able to
6 matches
Mail list logo