PDA

View Full Version : A working eraser tool.



mattkenefick
November 2nd, 2008, 08:37 PM
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.

bootiteq
November 2nd, 2008, 10:24 PM
Nice thanks for sharing

Dom_
November 3rd, 2008, 04:42 AM
nice, would be cool if you added opacity options to it

djnorthyy
November 3rd, 2008, 07:30 PM
Very cool!