# Arrays and hitTest

**URL:** <https://forum.kirupa.com/t/arrays-and-hittest/70401>\
**Category:** flash\
**Created:** [November 13, 2004, 5:25pm UTC](https://forum.kirupa.com/t/arrays-and-hittest/70401 "2004-11-13T17:25:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Russkie](https://avatars.discourse-cdn.com/v4/letter/r/6f9a4e/32.png) [@Russkie](https://forum.kirupa.com/u/Russkie)\
**Post date:** [November 13, 2004, 5:25pm UTC](https://forum.kirupa.com/t/arrays-and-hittest/70401/1 "2004-11-13T17:25:21Z")

</div>

I have a game which is almost done, it consists of a player(player1) and a few enemies(enemy 1,2,3).

The enemies I’m planning to duplicate using arrays.  
So here is the problem, my player has a gun that duplicates a bullet movieclip from a point in the gun, and I want that bullet to stop going after it hits the sandbox(bags).

onClipEvent (enterFrame) {  
if (\_root.player1.arms[“laser”+laserCounter].hitTest(\_root.bags)) {  
\_root.player1.arms[“laser”+laserCounter].removeMovieClip;  
}  
}
