So I am working on a project in which I need to trigger a click event. However, its a little more complicated then just that. I know how to dispatch an event by doing btn.dispatchEvent(), but the problem is I dont know which button it will be. Basically I am creating a wheel that spins. I need to trigger the click event of the element that is at the top and center of the wheel when it stops spinning. Is it possible to trigger a click event at a point? Is there a better way to do this?
+1
A:
Defined in flash.display.DisplayObjectContainer
stage.getObjectsUnderPoint(new Point(x, y));
Or some other display object.
Returns an array of objects that lie under the specified point and are children (or grandchildren, and so on) of this DisplayObjectContainer instance. Any child objects that are inaccessible for security reasons are omitted from the returned array. To determine whether this security restriction affects the returned array, call the areInaccessibleObjectsUnderPoint() method.
Tegeril
2010-08-20 02:39:04
Thanks for the help. Works great.
ngreenwood6
2010-08-20 03:39:51
No problem at all.
Tegeril
2010-08-20 05:25:02