Sliding content

hi

I’m developing a site using sliding content - controlled with up and down buttons. But I’m having problems with the positioning ‘degrading’ the more the up / down buttons are pressed:

You can see this here: http://www.detkendesign.com/detken2/portfolio.htm

I’m using the AS below for the buttons.

Grateful for any ideas on a fix.

Thanx

Dirk

onClipEvent (load) {
_x = 0;
_y = 0;
div = 5;
}

onClipEvent (enterFrame) {
_x += (endX-_x)/div;
_y += (endY-_y)/div;

_root.up.onRelease = function() {
    if(_y<-260){
        endX = 0;
        endY = _y+260;}

};

_root.down.onRelease = function() {
    if(_y>-1040){
        endX = 0;
        endY = _y-260;}

};

}