At 5/2/09 07:17 PM, Blue-Devil23 wrote:
You need to be more speific
I get the gist of what he's saying :/
The syntax for a shapeFlag hitTest is just:
AS2:
hitTest(x:Number, y:Number, shapeFlag:Boolean);
AS3:
hitTestPoint(x:Number, y:Number, shapeFlag:Boolean);
In each case, the x and y values represent a point (annoyingly in the main stage co-ordinate system, so either translation or a method like localToGlobal are needed if you're using co-ordinates in the reference frame of another object).
shapeFlag should be set to true if you want the collision detection to be against the actual shape. Setting it to false does the detection against the clip's bounding box (rectangle) instead, providing a performance increase where accuracy isn't required (although I believe an object-to-object detection may outperform it).