1

I would like to use bitmapdata to detect collision of a sprite with letters inside a page of text. I have tried to do it with getPixels and test for the color but it seems that it's not accurate enough. I don't try hit test collision with bitmapdata because I don't know how to look for the black pixels only.

j0k
  • 22,600
  • 28
  • 79
  • 90
  • You can use BitmapData.draw to draw any DisplayObject to BitmapData, then you should be able to use BitmapData.hitTest to do collision detection http://www.mikechambers.com/blog/2009/06/24/using-bitmapdata-hittest-for-collision-detection/ – shaunhusain Sep 03 '12 at 04:22

0 Answers0