Help needed on paning map

Hi All

I wana have an automated paning in flash. i have a map i want when user double clicks some where on the map then map then should start paning and stop when center the map on the spot that the user doubled clicked.

Here is the code for double click

//set initial variables
click = false;
//function for the button press
button_btn.onPress = function() {
//if this is the first click
if (!click) {
timer = getTimer()/1000;
_root.click = true;
//find out if it is a double click
} else {
timer2 = getTimer()/1000;
_root.test2 = timer2-timer;
//if it is a double click
if ((timer2-timer)<.25) {
//toggle the box mc on and off

// Some code goes here

trace(“Double click detected”)

    //if it is not a double click, reset the variables to a single click
    } else {
        timer = getTimer()/1000;
        _root.click = true;
    }
}

};

Thanks