# Accurate hitTesting updating arrays with collisions.F8 CS3.zip

**URL:** https://forum.kirupa.com/t/accurate-hittesting-updating-arrays-with-collisions-f8-cs3-zip/258600
**Category:** flash
**Created:** [April 25, 2008, 3:29pm UTC](https://forum.kirupa.com/t/accurate-hittesting-updating-arrays-with-collisions-f8-cs3-zip/258600 "2008-04-25T15:29:11Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Daky](https://avatars.discourse-cdn.com/v4/letter/d/34f0e0/32.png) [@Daky](https://forum.kirupa.com/u/Daky)
#### Post date: [April 25, 2008, 3:29pm UTC](https://forum.kirupa.com/t/accurate-hittesting-updating-arrays-with-collisions-f8-cs3-zip/258600/1 "2008-04-25T15:29:11Z")

</div>

:drool: Hello all i have a few problems with a music sequencer that i think will be quite basic for some however im quite new to flash and still have a way to go …I have 4 ball movie clips, a playhead and four target movieclips called mc\_1-4, the array, (my\_array), has 4 elements, which are each defined as having values of 0: I have a hitTest set up that will trace my\_array to the output window each time it hits mc\_1, to see what is happening. However the hitTest prints the array 3 times?  
Am i right in thinking that this is because the hitTest is being triggered on entry of mc\_1 in the center and upon exit?  
I need to make this hitTest be triggered once when the hitTest passes the center of mc\_1.

Secondly if any of the balls have been dragged and dropped on to mc\_1 i want the array value with an index of 0, to change to 100 from 0 (not in terms of its index position because my array is only 4 elements long, in terms of its actual value) which i have tried to implement but i cannot configure the right code.

so i need…

1. hit tests that only trigger once when they pass through the center of the object thus tracing one array.  
2.use the balls 1-4 to make the array index 0, have a value of 100 if they are in contact with mc\_1.

I have zipped the files up.

Thanks in advance:

DaKY~
