# Continuous Side Scrolling Gallery

**URL:** <https://forum.kirupa.com/t/continuous-side-scrolling-gallery/308894>\
**Category:** flash\
**Created:** [May 2, 2010, 9:40pm UTC](https://forum.kirupa.com/t/continuous-side-scrolling-gallery/308894 "2010-05-02T21:40:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rheece](https://avatars.discourse-cdn.com/v4/letter/r/779978/32.png) [@rheece](https://forum.kirupa.com/u/rheece)\
**Post date:** [May 2, 2010, 9:40pm UTC](https://forum.kirupa.com/t/continuous-side-scrolling-gallery/308894/1 "2010-05-02T21:40:32Z")

</div>

Hi peeps,

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

[http://www.johnwrightphoto.com/](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](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.

```auto
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!
