# Can someone help me with arrays

**URL:** https://forum.kirupa.com/t/can-someone-help-me-with-arrays/278655
**Category:** programming
**Created:** [January 3, 2009, 6:25am UTC](https://forum.kirupa.com/t/can-someone-help-me-with-arrays/278655 "2009-01-03T06:25:51Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![crucifix](https://avatars.discourse-cdn.com/v4/letter/c/bc79bd/32.png) [@crucifix](https://forum.kirupa.com/u/crucifix)
#### Post date: [January 3, 2009, 6:25am UTC](https://forum.kirupa.com/t/can-someone-help-me-with-arrays/278655/1 "2009-01-03T06:25:51Z")

</div>

Hi i just have a question about AS2 arrays and use in games, i am making this game where a bullet(attachedMovieClip) is shot out and passes over a duplicated zombie character(duplicated movie clip) i have made an array for them called zombieArray() and i am trying to run a hitTest between them, heres the code.

iBullet.onEnterFrame = function() {

```
        this._x += this.xSpeed;
        this._y += this.ySpeed;
        
        for(x in zombieArray){
            if (this.hitTest(_root[zombie[x]])) {
                callGore(this,"head");
                createGibs(this,"head");
                this.removeMovieClip();
                //_root.zombieArray.splice(x, 1); should remove zombie from array
        }
        }

```

…blah blah the funtion goes on. all the other functions work its just wont register the hit with the movieclips. Pease can someone help me out:(
