> How do I trace out [object Object]??
use typeof to check if it's "object", "array", "movieclip" or
"function" (the types that can contain others as properties). if so,
just ASSetPropFlags again and for..in loop through these, too,
recursively.
*however*, you'll get stuck in a loop very quickly. just imagine a
reference to _root somewhere... that's why you must tag objects
somehow, to prevent looping through them again. also, you'll need a
time-to-live parameter, to set the maximum recursion depth (say, to
3).
this has all been discussed already, on december 1st and the following
days. the thread was called "Recursive loop showing all items".
hth,
mark
On 1/22/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Hi
> I want to be able to trace out ALL properties and values for nested objects.
> Will ASSetPropFlags allow me to do this??
>
>
> If I define an object as:
>
> //BEGIN CODE
> myObject={
> a:1,
> b:2,
> c:3,
> _event:{_parentOb:this,
> method:'func',
> _params:{arg1:1, arg2:2, arg3:3}
> }
>
> };
>
>
> ASSetPropFlags(myObject,null,0,1);
>
>
>
> //trace out properties and values
>
> for(var prop:String in myObject){
>
> trace("propertyname:"+prop);
> trace("propertyvalue:"+myObject[prop]) ;
>
>
> }
>
>
> //CODE END
>
> I get the following:
> propertyname:a
> propertyvalue:1
> propertyname:b
> propertyvalue:2
> propertyname:c
> propertyvalue:3
> propertyname:_event
> propertyvalue:[object Object]
> propertyname:__proto__
> propertyvalue:[object Object]
> propertyname:constructor
> propertyvalue:[type Function]
>
>
> How do I trace out [object Object]??
>
>
>
> Thanks in advance
> Jim Bachalo
>
>
> [e] jbach at bitstream.ca
> [c] 416.668.0034
> [w] www.bitstream.ca
> --------------------------------------------
> "...all improvisation is life in search of a style."
> - Bruce Mau,'LifeStyle'
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
--
http://snafoo.org/
jabber: [EMAIL PROTECTED]
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders