"so.data.MyIndex.toString" is a function object. "so.data.MyIndex.toString()" is a string representation of "so.data.MyIndex".
-- T. Michael Keesey -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Céline Nguyen Sent: Sunday, August 06, 2006 4:18 PM To: Flashcoders mailing list Subject: [Flashcoders] name objects dynamicly I want to create a Shared Object and store lots of arrays and an index. In order to be able to retrieve the right array in the future, I'd like to name each array after the following pattern : MyArrayName + MyIndex so = SharedObject.getLocal("MyLocalSharedObject"); so.data.MyArrayName["MyIndex"+so.data.MyIndex.toString] = []; so.data.MyArrayName["MyIndex"+so.data.MyIndex.toString].push("member 0"); I don't understand because I have no compile time error, but trace("so.data.MyArrayNameMyIndex0[0] is undefined. Same when I want to give a dynamic name of a new class object instance. I don't know how to write it. Have you got an idea, please ? _______________________________________________ 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