Guys need help on BitmapData HitTest
I know there’s a lot of code about hitTest ,and it works
but he problem is I have a rotation image that have unwanted behavior
if I rotate the image.
it works great if its a circle but not with other shape like box
seems like the boundary box problem
here’s the code
var pt:Point= new Point(ld2.x2,ld2.y2);
var pt2:Point= new Point(elementTarget.x2,elementTarget.y2);
var bmapDataS:BitmapData = new BitmapData(ld2.width, ld2.height, true, 0x00000000);
var bmapDataT:BitmapData = new BitmapData(elementTarget.width, elementTarget.height, true, 0x00000000);
bmapDataS.draw(ld2, new Matrix());
bmapDataT.draw(elementTarget, new Matrix());
if (bmapDataS.hitTest(pt,0x80,bmapDataT,pt2,0x80)) {
ld2.removeEventListener(Event.ENTER_FRAME,enterFrameHandler3);
loop=0;
}
where ld2 and elementTarget is Loader and I load the Image using URLRequest
Thanks for the help