# \[mx/2004\]storing variables with array

**URL:** <https://forum.kirupa.com/t/mx-2004-storing-variables-with-array/122142>\
**Category:** Uncategorized\
**Created:** [September 10, 2004, 5:16pm UTC](https://forum.kirupa.com/t/mx-2004-storing-variables-with-array/122142 "2004-09-10T17:16:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kdzines](https://avatars.discourse-cdn.com/v4/letter/k/7ea924/32.png) [@kdzines](https://forum.kirupa.com/u/kdzines)\
**Post date:** [September 10, 2004, 5:16pm UTC](https://forum.kirupa.com/t/mx-2004-storing-variables-with-array/122142/1 "2004-09-10T17:16:48Z")

</div>

hi there,

i want to find out how to design a multi dimensional array. let me give an example:

say i have 5 buttons, and each one calls a function that moves the background x and y positions.

i could declare the x and y vars when i call the function

```auto

butt.onPress = function(){
moveBack(myX,myY)
}

```

this however seems a bit basic.

is there a way that i could make an array that would store the name of the button, the x value for that button and also the y value for that button?

also how would i access the array properly?
