# Calling an array in an "if" statement

**URL:** <https://forum.kirupa.com/t/calling-an-array-in-an-if-statement/163037>\
**Category:** flash\
**Created:** [September 19, 2005, 8:38am UTC](https://forum.kirupa.com/t/calling-an-array-in-an-if-statement/163037 "2005-09-19T08:38:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![iLikePie](https://avatars.discourse-cdn.com/v4/letter/i/85f322/32.png) [@iLikePie](https://forum.kirupa.com/u/iLikePie)\
**Post date:** [September 19, 2005, 8:38am UTC](https://forum.kirupa.com/t/calling-an-array-in-an-if-statement/163037/1 "2005-09-19T08:38:51Z")

</div>

hi all,

this is (hopefully) a pretty easy thing, but i’m having a bit of trouble with using an array in my if statement. Here’s my AS:

```auto

on (release) {
	stopDrag ();
	if(this.checker.hittest(_root.holdernumber.checker)){
		this._x=_root.holdernumber._x;
		this._y=_root.holdernumber._y;
	}
	
}

```

basically you drag a block around, then when you let go, the “checker” inside the block sees if it’s contacting with a holder, and then clicks in if so.

i’ve defined the array holdernumber = [“holderone”, “holdertwo”] etc. and so i basically want to do a check for each holder, to see if it’s over any of them… i think i could use droptarget but i haven’t got that working yet, and i want to learn this anyway.

So, is there some special way to phrase it so it uses the array items instead of looking for a clip called “holdernumber” ?

Thanks heaps
