Thanks John,
My loop is even simpler. I failed to mention that I need to examine nested
MovieClip instances for functions. Variables seem to appear as expected, but
functions only appear for the current scope. Very strange.
Works as expected:
for (var propertyIdentifier:String in this)
{
trace(propertyIdentifier);
}
Does not work as expected:
for (var propertyIdentifier:String in this.someNestedInstance)
{
trace(propertyIdentifier);
}
-
Jason
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf
> Of John Mark Hawley
> Sent: Thursday, April 05, 2007 3:54 PM
> To: [email protected]
> Subject: Re: [Flashcoders] Enumerating properties from
> outside an instance.
>
> You can do it; you must have an error in your code.
>
> for (var prop:String in clip)
> {
> var subObject:Object = clip[prop];
> for (var otherProp:String in subObject)
> {
> trace(otherProp + ": " + subObject[otherProp]);
> }
> }
>
> It should look like that, but not horrible.
>
> >
> > From: "Jason Lutes" <[EMAIL PROTECTED]>
> > Date: 2007/04/05 Thu PM 04:10:48 CDT
> > To: <[email protected]>
> > Subject: [Flashcoders] Enumerating properties from outside
> an instance.
> >
> > I can't figure this out.
> >
> > I can set up a for...in loop to show me all the
> (enumerable) properties -- variables and functions -- on the
> MovieClip instance where I place the loop, but I can't
> enumerate properties for other (nested) MovieClip instances
> by simply changing the focus object of that same for...in loop.
> >
> > Why not?
> >
> > If I move the enumerating loop into the nested clips it
> works as expected.
> >
> >
> > -
> > Jason
> > _______________________________________________
> > [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
> >
>
> --
> John Mark Hawley
> The Nilbog Group
> 773.968.4980 (cell)
>
> _______________________________________________
> [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