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 _level0. For that, you might try setting
_lockroot = true on the swf that's loaded and go from there.
On 9/29/06, Hans Wichman <[EMAIL PROTECTED]> wrote:
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), walking
through all functions in all classes and wrapping them the way Ray did
below.
If you'd use xflas2 (osflash.org/xflas2) with this, the classfinder and
functionfinder would already have been provided, and you could set a
FunctionHandler on the FunctionFinder which does the wrapping for you. I
am
working on having xflas2 provide the functionality you mention out of the
box, but for now, you'd have to add it yourself.
The nice thing with xflas2 though is that you could use:
Logger.markEntry(arguments);
instead of
trace("{function: prop args: "+arguments+"}");
and it would trace for example ClassA.methodA called from
ClassB.methodBwith arguments (1,2,3,4)
Since I havent gotten to doing myself yet, I can't tell what kind of
problems you'll encounter and if its possible at all:)
Another great tool to inspect your movie would be Xray ofcourse (
osflash.org/xray).
greetz
JC
On 9/29/06, Ray Chuan <[EMAIL PROTECTED]> wrote:
> 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, "fly");
>
> You could easily write something that wraps every method.
>
> On 9/28/06, Vishal Kapur <[EMAIL PROTECTED]> wrote:
> > 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 do that in a non-intrusive and generic way.
> >
> > Wondering what people's thoughts are on this. I can see a couple of
> > potential ways this could be done: one, override some internal
> > function that is used to make function calls; two, use a function like
> > __resolve() that would get called when any defined function is
> > invoked. Anybody know if such things exist? Or if there is some
> > other, simpler way which I'm missing?
> >
> > Thanks,
> > Vishal
> > _______________________________________________
> > [email protected]
> > To change your subscription options or search the archive:
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> > Brought to you by Fig Leaf Software
> > Premier Authorized Adobe Consulting and Training
> > http://www.figleaf.com
> > http://training.figleaf.com
> >
>
>
> --
> Cheers,
> Ray Chuan
> _______________________________________________
> [email protected]
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
--
[ JPG ]
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com