Zooming & panning

Ok, I have a very simple zoom code here:

on (release) {
_xscale = 400;
_yscale = 400;
_x=-800
_y=-1000
}

I want the zoom to ease in, instead of snap zooming.
Also I want to be able to pan when the mouse rolls close to the edge.