George Reith
George Reith

Reputation: 13476

Actionscript 2: Hittest on multiple MCs

I am running a hittest on an array of thousands of MCs a little a part, due to the nature of this sometimes two can be hit at once.

How would I narrow it down so that the one which is hit the most is the one returned value?

Upvotes: 0

Views: 413

Answers (1)

Bob
Bob

Reputation: 11

Have a specific variable increment each time a specific movieclip is hit. Place all of these variables in an array.

sortOn the array for DESCENDING order.

select the first element in the array (myArray[0]), as that will have the highest value

Upvotes: 1

Related Questions