I believe it'll always come in as a string - but you can use the split
keyword quite easily. I pick a separator character that won't appear in
my array like the pipes....
myString =val1|val2|val3|val4|val5
Once you load the string...
myArray = myString.split('|');
So then myArray will an array full of your values.
ben
Alexander Farber wrote:
Hello,
I'm working on a flash game sending data to an Apache module
through the LoadVars.sendAndLoad() (i.e. I use neither XML, nor AMF,
but send the "application/x-www-form-urlencoded" strings around).
I wonder, how do the other folks send arrays, since you
unfortunately can't send a key more than once:
var resp_lv:LoadVars = new LoadVars();
resp_lv.decode('my_array=1&my_array=2');
for (var key in resp_lv) {
trace('key=' + key + ', val=' + resp_lv[key]);
}
this will print only the last one:
key=my_array, val=2
So what do you guys use? Do you glue array elements
together using %0A or %00 or is there smth. better?
Regards
Alex
a
_______________________________________________
[email protected]
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