You're right, of course. I wasn't thinking correctly. The MovieClip object has a toString() method which should return the name of the MovieClip Object. I guess I was specifically thinking about the v2 Components, which return "[object Object]" unless you also include the ._name property. Sorry for the confusion.
Hal -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andy Herrman Sent: Wednesday, September 12, 2007 6:31 AM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] toString(aArray[i]) ?? does this work You say "[object Object]" is the correct output if the object is a movie clip. This isn't the behavior I see. Any time I trace a movie clip I get the clip's name (level0.foo.bar.whatever), not the generic object results. -Andy On 9/11/07, Hal Leonard <[EMAIL PROTECTED]> wrote: > Try toString(aArray[i]._name) instead.... I'm not 100% sure what you're > storing in your array, but it sounds like you're storing movieClip objects > in there, in which case the result [object Object] would be the correct > output. > > Hal > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > [EMAIL PROTECTED] > Sent: Monday, September 10, 2007 8:30 PM > To: Flash Coders > Subject: [Flashcoders] toString(aArray[i]) ?? does this work > > > Quick question, can I toString an array element. > ie: var myStr:String = toString(aArray[i]); // where 'i' is the > increment. > > I am having an issue with this. when I trace myStr it traces [object > object] > instead of what I intended/expected "mcMovieClipName14" as a string. > > Any insite would be appreciated. > > Thanks in advance, > > Paul V. > _______________________________________________ > 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 _______________________________________________ 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