This content has been marked as final.
Show 2 replies
-
1. Re: accessing array
atta707 Mar 4, 2009 1:53 AM (in response to rahimhaji)Well,
chk + variablename1 +[+variablename2+]
won't work. You can instead have a double dimensional array:
var chk:Array = new Array();
chk.push([1,2,3,4,5]);
chk.push([a,b,c,d,e]);
chk.push([f,g,h,j,k]);
chk[0][2] should give you 3!
I hope this helps.
ATTA -
2. Re: accessing array
Newsgroup_User Mar 4, 2009 3:51 AM (in response to rahimhaji)Since objects are just associative hashes, you can also do this by using:
this["chk"+variablename1][variablename2]
But in this case, since the different arrays are obviously closely
related, I would suggest following ATTA's advice and using
multi-dimensional arrays.


