# How to access this Array element

**URL:** https://forum.kirupa.com/t/how-to-access-this-array-element/224686
**Category:** flash
**Created:** [May 4, 2007, 1:21pm UTC](https://forum.kirupa.com/t/how-to-access-this-array-element/224686 "2007-05-04T13:21:30Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Beebs](https://avatars.discourse-cdn.com/v4/letter/b/47e85d/32.png) [@Beebs](https://forum.kirupa.com/u/Beebs)
#### Post date: [May 4, 2007, 1:21pm UTC](https://forum.kirupa.com/t/how-to-access-this-array-element/224686/1 "2007-05-04T13:21:30Z")

</div>

Here’s the function :

```auto

var curItem;

function disableAll(){
	
	for (var i=0;i<buttonArray.length;i++){
		trace(buttonArray*)
	}
}

```

Here’s the problem/question :

- I want to assign the var curItem into the onRelease function throughout the buttonArray. How?
