Double Click MC?

I am trying to create a function where if a user double clicks on a particular mc the mc will reset itself to its original zoom and position…however, I cannot get this feature to work correctly…when I do get the feature to work, I cannot drag and pan the mc…if the feature is disabled, I can drag and pan the mc…here is the code I came up with to double click reset the mc…but it does not work…can someone help?

[AS] = false;
_global.CAD.onPress = function() {
if (!click) {
timer = getTimer()/1000; = true;
else {
timer2 = getTimer()/1000;
if ((timer2-timer)<.25) {
_global.zoom._xscale = _global.zoom._yscale = mc_scale;
_global.container._x = mc_X;
_global.container._y = mc_Y;
} else {
timer = getTimer()/1000; = true;

_global.CAD.onRelease = function() {
delete _global.CAD.onPress;
delete _global.CAD.onRelease;
delete _global.CAD.onReleaseOutside;