Continuous Side Scrolling Gallery

Hi peeps,

I’m trying to create the look at the following website:

http://www.johnwrightphoto.com/

Once it’s loaded click the screen and at the bottom left go to portfolios. Click on one of them and you’ll see a slow continuous side scrolling gallery. I’ve got everything working apart from when I mouse off it continues at the speed at which I left it. I would like it to slow to a default speed and continue scrolling as in the example I’ve given.

I should mention I followed tutorial here:

http://tutorials.flashmymind.com/2009/04/infinite-gallery-menu/comment-page-1/#comment-32816

It’s been a while since I dabbled with Flash and especially AS3! Here is the code I’m using so far.

import gs.*;

var centerX:Number = stage.stageWidth / 2;

var galleryWidth:Number = images.width;

var speed:Number = 0;

addEventListener(Event.ENTER_FRAME, move);

function move(e:Event):void {
    speed = -(0.01 * (mouseX - centerX));

    images.x+=speed;

    if (images.x>0) {
        images.x= (-galleryWidth/2);
    }

    if (images.x<(-galleryWidth/2)) {
        images.x=0;
    }
}

Any help would be much appreciated, thanks!