Pixel Perfect Collision Detection

Hi there,
guys i need build pixel based collision dectection class , i have found some classes already built by different people and they are really usefull, but as i want to build one of my own, i need to know basic theory behind that, can some be so nice to explain how can i build it…

here is the link to classes i found on web…
http://troygilbert.com/2007/06/pixel-perfect-collision-detection-in-actionscript3/

http://www.adventuresinactionscript.com/blog/15-03-2008/actionscript-3-hittestobject-and-pixel-perfect-collision-detection?page=2

http://www.tink.ws/blog/as-30-hittest/

thanks in advance…=)