Menu rollover - need some help

How do I change this so, that onPress function works like on (rollOver)


content_mc.stop();
speed = 5;
target = button1._x;
for (var i = 1; i<7; i++) {
    this["button"+i].pageNum = i;
    this["button"+i].**onPress = function() {
        target = this._x;
        content_mc.gotoAndStop(this.pageNum);**
    };
}
this.onEnterFrame = function() {
    current._x += (target-current._x)/speed;
};