RE: [Flashcoders] Accessing an Associative Array

2007-03-13 Thread Alain Rousseau
the Object notation, but you will lack all the Array object specific methods Alain -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andy Herrman Sent: 12 mars 2007 16:47 To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] Accessing an Associative

RE: [Flashcoders] Accessing an Associative Array

2007-03-13 Thread Merrill, Jason
Technology Operations Learning Leadership Development eTools Multimedia Team -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alain Rousseau Sent: Tuesday, March 13, 2007 9:58 AM To: flashcoders@chattyfig.figleaf.com Subject: RE: [Flashcoders] Accessing

RE: [Flashcoders] Accessing an Associative Array

2007-03-12 Thread Merrill, Jason
arr = new Array() myVar = elem2 arr[elem1] = hello arr[elem2] = hi trace(arr[myVar]) Jason Merrill Bank of America Global Technology Operations Learning Leadership Development eTools Multimedia Team -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf

Re: [Flashcoders] Accessing an Associative Array

2007-03-12 Thread R�kos Attila
Variable identifiers are not string constants, so: showPopup(myarray); However mainMap[popup].gotoAndPlay(on); has no sense in this case, since the array notation excepts a string and not an object. Ans also you don't need to use array notation here at all, the simple dot syntax is enough:

Re: [Flashcoders] Accessing an Associative Array

2007-03-12 Thread Andy Herrman
I think this is your problem: showPopup(myarray); You're passing showPopup a string with the value myarray, not the array. Remove the quotes and you should be good. -Andy On 3/12/07, Bill Abel [EMAIL PROTECTED] wrote: How do you access an associate array using a variable? Inside my

Re: [Flashcoders] Accessing an Associative Array

2007-03-12 Thread Bill Abel
How do you do it where myVar is the array? Is this possible? Or do you always have to specify the array? arr = new Array() arr[elem1] = hello arr[elem2] = hi function testArray(myVar) { trace(myVar[elem2]); }; testArray(arr); On Mar 12, 2007, at 3:17 PM, Merrill, Jason wrote: arr = new

RE: [Flashcoders] Accessing an Associative Array

2007-03-12 Thread Merrill, Jason
Sent: Monday, March 12, 2007 5:02 PM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] Accessing an Associative Array How do you do it where myVar is the array? Is this possible? Or do you always have to specify the array? arr = new Array() arr[elem1] = hello arr[elem2] = hi

Re: [Flashcoders] Accessing an Associative Array

2007-03-12 Thread Bill Abel
Your right. I am passing a string. But I'm trying to use that string to access an array by the same name. someArray = { label: my text }; showPopup(someArray); // send a string which is the name of my array in the function: myDynamicText.text = myArray[label]; // try to use the passed

Re: [Flashcoders] Accessing an Associative Array

2007-03-12 Thread Bill Abel
Team -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bill Abel Sent: Monday, March 12, 2007 5:02 PM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] Accessing an Associative Array How do you do it where myVar is the array