# Trigger clips from Array using hitTest?

**URL:** <https://forum.kirupa.com/t/trigger-clips-from-array-using-hittest/230290>\
**Category:** flash\
**Created:** [June 25, 2007, 3:15am UTC](https://forum.kirupa.com/t/trigger-clips-from-array-using-hittest/230290 "2007-06-25T03:15:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Head\_In\_A\_Pan](https://avatars.discourse-cdn.com/v4/letter/h/c67d28/32.png) [@Head\_In\_A\_Pan](https://forum.kirupa.com/u/Head_In_A_Pan)\
**Post date:** [June 25, 2007, 3:15am UTC](https://forum.kirupa.com/t/trigger-clips-from-array-using-hittest/230290/1 "2007-06-25T03:15:21Z")

</div>

Hello again,

I’ve built an array of movieclips - all of them sitting static on the stage.

I’m trying to trigger the clips to play as they are hit by an invisible/alpha 0 bar which sweeps across the stage… kind of like a mexican wave?

I’m still a bit crappy with arrays - here’s my code:  
Can somebody please tell me what I’m doing wrong?

```auto

var target_mc:Array = new Array();

for (var i:Number = 1; i <= 30; i++)
{
    target_mc.push("b" + i);
}

onEnterFrame = function() {
 if (trigger_mc.hitTest(target_mc*)) {
     target_mc.gotoAndPlay(1);
 }
}

```
