Done, using bitmapdatas.
http://spamtheweb.com/ul/upload/270209/7 6363_erase.php
It basically makes a transparency enabled BitmapData of the image, and then you can draw rectangles with 0 alpha onto it to make it have holes.
import flash.display.*;
import flash.geom.*;
var lastx:Number = 0;
// Last x mouse
var lasty:Number = 0;
// Last y mouse
var maskBit:BitmapData = new BitmapData(640,480,true,0);
mask.attachBitmap(maskBit,0,"auto",false);
maskBit.draw(erase);
function onEnterFrame () {
recta = new Rectangle(_xmouse - 16,_ymouse - 16,32,32);
if (Key.isDown (1)) {
maskBit.fillRect(recta,0);
}
lastx = _xmouse;
// Update last x
lasty = _ymouse;
// ... and y
}
erase is the mc that holds the image you want to erase. the dimentions should be your stage size (of the bitmapdata). Mask is an mc above the one you want to be behind the erased image.