# Multidimensinal Arrays problem

**URL:** <https://forum.kirupa.com/t/multidimensinal-arrays-problem/24777>\
**Category:** flash\
**Created:** [July 4, 2003, 4:55pm UTC](https://forum.kirupa.com/t/multidimensinal-arrays-problem/24777 "2003-07-04T16:55:53Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mythmon](https://avatars.discourse-cdn.com/v4/letter/m/aeb1de/32.png) [@Mythmon](https://forum.kirupa.com/u/Mythmon)\
**Post date:** [July 4, 2003, 4:55pm UTC](https://forum.kirupa.com/t/multidimensinal-arrays-problem/24777/1 "2003-07-04T16:55:53Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 4, 2003, 5:01pm UTC](https://forum.kirupa.com/t/multidimensinal-arrays-problem/24777/2 "2003-07-04T17:01:06Z")

</div>

you cant start instance names with numbers

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

?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 4, 2003, 5:41pm UTC](https://forum.kirupa.com/t/multidimensinal-arrays-problem/24777/3 "2003-07-04T17:41:11Z")

</div>

oh ok thank you

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 4, 2003, 6:22pm UTC](https://forum.kirupa.com/t/multidimensinal-arrays-problem/24777/4 "2003-07-04T18:22:38Z")

</div>

And maybe easier to write:

```auto
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. 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 4, 2003, 6:33pm UTC](https://forum.kirupa.com/t/multidimensinal-arrays-problem/24777/5 "2003-07-04T18:33:49Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 4, 2003, 6:53pm UTC](https://forum.kirupa.com/t/multidimensinal-arrays-problem/24777/6 "2003-07-04T18:53:38Z")

</div>

myDots[x][y]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 4, 2003, 9:57pm UTC](https://forum.kirupa.com/t/multidimensinal-arrays-problem/24777/7 "2003-07-04T21:57:16Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 5, 2003, 1:04am UTC](https://forum.kirupa.com/t/multidimensinal-arrays-problem/24777/8 "2003-07-05T01:04:18Z")

</div>

> \*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.
