Dispatching Object Events Manually

Is there a way to find an object by position and dispatch a touch event to it? I know how to dispatch the touch event, but the finding by position? The easiest way, of course, would be to loop through all display objects (not hard) and check for bounds, but, of course, that would be extremely slow

Is there a fast way to do this?

  • C

Hi Caleb,

Is the object a physics object, by chance?

Brent

No… Already thought of .queryRegion, if that’s what you were going to suggest :slight_smile:

  • C

Dang, you read my mind. :stuck_out_tongue:

I think your best option might be to manually group your objects into “regions” somehow, so that looping through them would be less intense than looping through all display objects.

Brent

Hi Caleb,

Is the object a physics object, by chance?

Brent

No… Already thought of .queryRegion, if that’s what you were going to suggest :slight_smile:

  • C

Dang, you read my mind. :stuck_out_tongue:

I think your best option might be to manually group your objects into “regions” somehow, so that looping through them would be less intense than looping through all display objects.

Brent