A working eraser tool

I’ve seen a few examples of drawing programs but they hardly ever have real eraser tools. They either replace something with white, delete entire objects, or don’t even have one. I created this one just to show how it’s done for those who don’t know.

http://mattkenefick.com/blog/2008/11/erasing-bitmapdata-using-actionscript/

If you want to use shapes for speed, simply create a Sprite object… On MOUSE_DOWN you do your drawing techniques, then on MOUSE_UP, you draw the Sprite to the BitmapData layer and Sprite.clear() your shape.

Easy as pie and allows a real eraser.