If you're looking to iterate through a nested object(s), then you have to create a nested loop:
function loopMe(target:Object):Void { trace('------ looping through: ' + target + '------'); for (var s:String in target) { trace(s + ': ' + target[s]); for (var t:String in target) { trace('\t' + t + ': ' + target[s][t]); } } } loopMe(myMC); -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jason Lutes Sent: Thursday, April 05, 2007 3:09 PM To: flashcoders@chattyfig.figleaf.com Subject: RE: [Flashcoders] Enumerating properties from outside an instance. 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: flashcoders@chattyfig.figleaf.com > 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: <flashcoders@chattyfig.figleaf.com> > > 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 > > _______________________________________________ > > Flashcoders@chattyfig.figleaf.com > > 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) > > _______________________________________________ > Flashcoders@chattyfig.figleaf.com > 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 > _______________________________________________ Flashcoders@chattyfig.figleaf.com 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 _______________________________________________ Flashcoders@chattyfig.figleaf.com 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