Ok, I'm not sure if this is exactly what you're trying to do, but I think this will at least get you on the right path to sorting out your problem. Copy in the new version of startCopy I've pasted below, into your code. Oh, and also import flash.display.*; so you have access to Bitmap.
private function startcopy(event:MouseEvent):void
{
xmouse = mouseX;
ymouse = mouseY;
trace("x=" + xmouse + ", y=" + ymouse);
loadedFrontBitmapData.copyPixels(loadedSurpriseBitmapData,
new Rectangle(mouseX,mouseY,10,10),
new Point(mouseX,mouseY));
var newBitmap:Bitmap = new Bitmap(loadedFrontBitmapData);
newBitmap.x = 0;
newBitmap.y = 0;
addChild(newBitmap);
}
All I've done is change the Rectangle and Point values you're passing into the copyPixel function, so that you'll see the background image appear as you move the mouse over the front image; then I've created a new Bitmap object using the updated data you're getting from copyPixel, and put that on the stage.
Hope it helps :)
debu
2010-02-26 05:56:53