photoStrip_mc["thumbnail" + I]_mc._width and
photoStrip_mc.thumbnail[I]_mc._width won't work. "[]" basically serve the purpose of periods.... they represent heirarchy, they don't perform an eval() (there is no AS3 equivalent of AS2's eval() btw). You were on the right path with: photoStrip_mc["thumbnail" + i + "_mc"]._width The only issue I see wrong is using "._width" instead of ".width" Then again, it is out of context, so I don't know what the rest of your code is, it might be that you are not properly assigning the values. As Muzak mentioned, I also usually just store mc's that I need to loop through in an array and do it that way. - Taka On Mon, Mar 30, 2009 at 12:02 PM, TS <[email protected]> wrote: > Ok that was my other question. Bouncing back from PHP to AS3 is making me > insane. Thanks for the info. Arrays are def the way to go. > > Thanks again, T > > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Muzak > Sent: Saturday, March 28, 2009 7:50 PM > To: Flash Coders List > Subject: Re: [Flashcoders] AS3 Object reference > > There's no "_width" in AS3.. it's "width". > Array access notation should work fine: > > photoStrip_mc["thumbnail" + i + "_mc"].width; > > > As a sidenote, you're better off storing references in an array for easy > access later. > > myClips = new Array(); > var len:uint = 10; > for(var i:uint=0; i<len; i++) { > var mc:MovieClip = new MovieClip(); > photoStrip_mc.addChild(mc); > myClips.push(mc); > } > > > If you need to access the clips at some later time, just loop through the > myClips Array. > > var len:uint = myClips.length; > for(var i:uint=0; i<len; i++) { > var mc:MovieClip = myClips[i]; > mc.width = someValue; > } > > regards, > Muzak > > > ----- Original Message ----- > From: "TS" <[email protected]> > To: "'Flash Coders List'" <[email protected]> > Sent: Sunday, March 29, 2009 3:09 AM > Subject: [Flashcoders] AS3 Object reference > > >> Trying to cylec through some objects. This doesn't seem to work in AS3 as > it >> does in AS2. Is there an equivalent in AS3? >> >> >> >> photoStrip_mc["thumbnail" + i + "_mc"]._width >> >> >> >> Thanks ahead, T >> > > _______________________________________________ > Flashcoders mailing list > [email protected] > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > _______________________________________________ > Flashcoders mailing list > [email protected] > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > _______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

