AS3 Tips: hitTest split into 2
the original MovieClip.hitTest can detect collisoin of boundary box of 2 objects or collision of a point and an object. These 2 are now split into 2:
-
//Evaluates the display object to see if it overlaps or intersects with the obj display object
-
hitTestObject(obj:DisplayObject):Boolean
-
//Evaluates the display object to see if it overlaps or intersects with the point specified by the x and y parameters
-
hitTestPoint(x:Number, y:Number, shapeFlag:Boolean = false):Boolean