Reputation: 43
Is it possible to return the Object that is underneath/in contact with another Object without using hitTestObject ? I'm wondering if I can remove the need to loop through an array of 'active' Objects and simply get the instance that's underneath at any given time. Possibly using as3 events ? many thanks SC
Upvotes: 0
Views: 167
Reputation: 9600
Be carefully, using a getObjectsUnderPoint()
.
getObjectsUnderPoint()
return types Array. this mean specify Point above all DisplayObjects return. sometimes you do not want to get the value. So the objects in the array must be verified. Faced this problem, especially DisplayObjects when they overlap or if you load the other swf
Upvotes: 0
Reputation: 318
You can use the getObjectsUnderPoint()
method of the DisplayObjectContainer class.
Upvotes: 1