Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
07-29-2009, 10:50 AM #1
- Join Date
- Mar 2008
- Thanked 21 Times in 20 Posts
Resolved: Array assignment error in AS2 - Simple bug
Here is the piece of code which doesn't seem to work:
lang_array[i]['eng'] = english; lang_array[i]['pol'] = polski; lang_array[i]['de'] = deutsch; trace(english); trace(i); trace(lang_array[i]['eng']);
This is a transcript.. 0 undefined This is a transcript2.. 1 undefined This is a transcript3.. 2 undefined
//added in to support multilingual transcripts var lang_array:Array = ;
hope someone can help!Andrew Sharman
Web designer, developer and programmer.
If you found my post helpful, why not give thanks! :)
07-29-2009, 10:35 PM #2
- Join Date
- Sep 2007
- Thanked 238 Times in 229 Posts
Assuming that english polski und deutsch are variables with data associated with them, that shouldn't be the problem. I feel like multidimensional arrays like their keys to be index with numbers, have you tried this?
lang_array[i] = 'english'; lang_array[i] = 'polski'; lang_array[i] = 'deutsch'; trace(english); trace(i); trace(lang_array[i]);
//added in to support multilingual transcripts var lang_array:Array = new Array();