Multidimensinal Arrays problem

im trying to mkae a matrix of movie clips that is 5x8 and heres the code have for it

[AS]
myDots = new Object();
myDots[0] = [00_mc, 01_mc, 02_mc, 03_mc, 04_mc, 05_mc, 06_mc, 07_mc];
myDots[1] = [10_mc, 11_mc, 12_mc, 13_mc, 14_mc, 15_mc, 16_mc, 17_mc];
myDots[2] = [20_mc, 21_mc, 22_mc, 23_mc, 24_mc, 25_mc, 26_mc, 27_mc];
myDots[3] = [30_mc, 31_mc, 32_mc, 33_mc, 34_mc, 35_mc, 36_mc, 37_mc];
myDots[4] = [40_mc, 41_mc, 42_mc, 43_mc, 44_mc, 45_mc, 46_mc, 47_mc];
[/AS]

and it comes up with this error
Scene=Scene 1, Layer=Layer 1, Frame=2: Line 3: ‘]’ or ‘,’ expected
myDots[“0”] = [00_mc, 01_mc, 02_mc, 03_mc, 04_mc, 05_mc, 06_mc, 07_mc];

now i know its not jiust this particualr line because if i remove it the next line does the same thing, so can some please help the newby?

you cant start instance names with numbers

… also, dont you want myDots to be a new Array()

?

oh ok thank you

And maybe easier to write:

myDots = [
[a00_mc, a01_mc, a02_mc, a03_mc, a04_mc, a05_mc, a06_mc, a07_mc],
[a10_mc, a11_mc, a12_mc, a13_mc, a14_mc, a15_mc, a16_mc, a17_mc],
[a20_mc, a21_mc, a22_mc, a23_mc, a24_mc, a25_mc, a26_mc, a27_mc],
[a30_mc, a31_mc, a32_mc, a33_mc, a34_mc, a35_mc, a36_mc, a37_mc],
[a40_mc, a41_mc, a42_mc, a43_mc, a44_mc, a45_mc, a46_mc, a47_mc]
];

I put the a’s there so it’s valid. :slight_smile:

your to late [m] im already done witht that and my next matrix

which in total has been 170 variables so far because of a 5x26 matrix as well as that 5*8 matrix
but i would like to know how do acces these matrixes, do i use myDots[x[y]] to access it?

myDots[x][y]

ok thankyou
hopefully the rest of my litle traing project will go smoothly

EDIT: ARGH! it wont work correctly

i have this code
[AS]
on (press) {
if (input == “A”) {
var temp = myletters[0][0];
if (temp>=128) {
_root.dot_07_mc._visible = 1;
trace(temp);
temp -= 128;
trace(temp);
}
}
}

when i click the button and the text field is set to the right value it will trace the 2 correct values but dot_07_mc still does not appear what am i doing wrong? i have checked, re-checked and re-re-checked my variable names many times and yet i cant figure out what is wrong.

can some one help me? Please?

*Originally posted by Mythmon *
**your to late [m] im already done witht that and my next matrix

which in total has been 170 variables so far because of a 5x26 matrix as well as that 5*8 matrix
but i would like to know how do acces these matrixes, do i use myDots[x[y]] to access it? **
You said that. I put that there for other people that read this tread.