var dPoint:Point = new Point(0, 0);

var dMap:BitmapData = new BitmapData(colorMap_mc.width, colorMap_mc.height, true, 0x808080)

dMap.draw(colorMap_mc)

removeChild(colorMap_mc)

var dFilter:DisplacementMapFilter = new DisplacementMapFilter ();

dFilter.scaleX = 50 // pixel displacement force on X
dFilter.scaleY = 50 // pixel displacement force on Y
dFilter.componentX = 1 // or BitmapDataChannel.RED
dFilter.componentY = 2 // or BitmapDataChannel.GREEN
dFilter.mode = "color" // or DisplacementMapFilterMode.COLOR / WRAP / CLAMP / IGNORE
dFilter.color = 0x000000 // color of pixels when source is empty
dFilter.alpha = 0 // alpha of colored pixels when source is empty
dFilter.mapPoint = dPoint; // position of the filters effect area
dFilter.mapBitmap = dMap; // map of colored pixels that controls the displacement
Image_mc.filters = [dFilter]

Image_mc.addEventListener(Event.ENTER_FRAME, onFrame)

function onFrame(e:Event){
dPoint.x += ((mouseX-colorMap_mc.width/2)-dPoint.x)*0.3
dPoint.y += ((mouseY-colorMap_mc.height/2)-dPoint.y)*0.3
lens_mc.x = dPoint.x-8
lens_mc.y = dPoint.y-8
dFilter.mapPoint = dPoint
Image_mc.filters = [dFilter]
}