Bitmap pattern matching

Hi All,

I am learning how to build a simple bitmap matching application.
For example, I have a predefined square shape as symbol, the user draw on the screen,
then I compare the 2 ‘bitmap’ to see how much ‘bits’ is overlap, if it is >80%, then is is accepted.

I have now setup a region user can draw on the screen, and I have a few simple shape images stored as Movieclips.

Next stage is to try to compare what is drawn to the movieclip.

Anyone can give me some code to compare one bitmap to another?

Thanks.