Pixel-level collision/setPixel32 question

I’m new to Bitmap manipulation, and am (predictably:sigh:) stuck on something; basically mimicking erasing.

I’ve got a bitmap image (a .png) in the Library linked as [COLOR=royalblue]Img[/COLOR]. I load it onto the stage. Under the cursor the pixel alpha-value goes to zero…

var picData:BitmapData = new Img(0,0);
var pic:Bitmap = new Bitmap(picData);
addChild(pic);
addEventListener(Event.ENTER_FRAME, erase);
function erase(e:Event){
   picData.setPixel32(mouseX,mouseY, 0x00000000);
}

This does work. What I’d like to do is be able to drag a 20x20-pixel square around on the image and have the same erasure effect, the pixels being erased being the ones under the square. I’d guess that pixel-level collision is involved, but I’ve hit a brick wall. Any input would be greatly appreciated. Thanks!