You can also just use the XrayTrace class if you'd like and modify it to
your liking. One thing that it has built in is recursion checking - ie -
you won't hit a 256 levels of recursion error, which wasn't addressed in the
above mentioned methods. If you have an array with objects or pointers that
would cause a circular reference, you'd get the 256 level error.
Example:
var obj = new Object();
obj.myObjRef = obj;
function searchMe(obj):Void
{
for(var items:String in obj)
{
if(typeof(obj[items]) == "object") searchMe(obj[items]);
}
}
searchMe(this);
This may seem like a rediculouse scenario, and it is, but it's to illustrate
situations where you register object references with other objects etc (ever
looked through any of the v2 components with Xray? that's a great example).
Recursion can get messy real fast.
If you have questions on the way I did the checking (IE: why not loop and
store object references?) I'd be glad to answer up ;) I've been down this
road a million times with Xray and would LOVE to find different methods for
attacking this very issue. So far, the current implementation is fast and
solid.
https://secure.sourcesecure.co.uk/trac/osflash/xray/browser/DEV_Source/xray/classes/com/blitzagency/xray/XrayTrace.as
Tanks!
On 1/19/06, Chris Allen <[EMAIL PROTECTED]> wrote:
>
> Try using Xray http://osflash.org/xray
>
> It comes with a tt(YourObject) method that will recursively trace your
> objects. It also allows you to inspect objects, MovieClips or whatever is
> in your Flash movie and manipulate them with a GUI at run-time. It's
> freaking great!
>
> -Chris
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
--
John Grden - Blitz
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders