-
I need real hitTest function that would use the real shape and the the bounding of the mc.
Anyone know how to create a real hitTest function ?
I create a little swf showing what I DON'T what it to do. The black box around the purple box is the bounding box. I want the ball to hit the purple box not the bounding box.
[swf width="200" height="200" background="#FFFFFF"]http://www.geocities.com/charlesfk/hittest.swf[/swf]
http://www.geocities.com/charlesfk/hittest.swf
You need Flash Player 6 to view this
-
check out the tutorials at
http://www.bit-101.com
he's got some insights....
also familiarize yourself with his favorites, hidden behind his calendar....
-
mymc.hitTest( x, y, True );
mymc would be your purple box.
x and y would be coordinates of the ball.
Actually, this is for the center of your ball, if you want to detect against the balls edge, you need to add/reduce its radius to the x/y of its center.