# Help with arrays

**URL:** https://forum.kirupa.com/t/help-with-arrays/137257
**Category:** Uncategorized
**Created:** [February 12, 2005, 6:08pm UTC](https://forum.kirupa.com/t/help-with-arrays/137257 "2005-02-12T18:08:00Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![flipside](https://avatars.discourse-cdn.com/v4/letter/f/c6cbf5/32.png) [@flipside](https://forum.kirupa.com/u/flipside)
#### Post date: [February 12, 2005, 6:08pm UTC](https://forum.kirupa.com/t/help-with-arrays/137257/1 "2005-02-12T18:08:00Z")

</div>

Hi,

I want to write this code with an array, don’t know if it’s possible…

```auto

_root.navi.vol00.onRelease = function() {
if (currentPict != 0) {
currentPict = 0;
_root.wiper._visible = true;
_root.wiper._width = 5;
_root.wiper.endwidth = 1178;
}
};
_root.navi.vol01.onRelease = function() {
if (currentPict != 1) {
currentPict = 1;
_root.wiper._visible = true;
_root.wiper._width = 5;
_root.wiper.endwidth = 1178;
}
};
_root.navi.vol02.onRelease = function() {
if (currentPict != 2) {
currentPict = 2;
_root.wiper._visible = true;
_root.wiper._width = 5;
_root.wiper.endwidth = 1178;
}
};
_root.navi.vol03.onRelease = function() {
if (currentPict != 3) {
currentPict = 3;
_root.wiper._visible = true;
_root.wiper._width = 5;
_root.wiper.endwidth = 1178;
}
};
_root.navi.vol04.onRelease = function() {
if (currentPict != 4) {
currentPict = 4;
_root.wiper._visible = true;
_root.wiper._width = 5;
_root.wiper.endwidth = 1178;
}
};
 

```

and so on…

Only the numbers change!

I need to do this for +80 buttons, so I was wondering if there is a way with an array I can do this all in one time.

I searched for array tutorials but didn’t succeed in transforming this code into a single array.

Suggestions are very welcome!

wouter
