# HELP NEEDED with scrolling images on website

**URL:** https://forum.kirupa.com/t/help-needed-with-scrolling-images-on-website/277282
**Category:** flash
**Created:** [December 10, 2008, 9:01am UTC](https://forum.kirupa.com/t/help-needed-with-scrolling-images-on-website/277282 "2008-12-10T09:01:14Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![AdamDavidFine](https://avatars.discourse-cdn.com/v4/letter/a/c77e96/32.png) [@AdamDavidFine](https://forum.kirupa.com/u/AdamDavidFine)
#### Post date: [December 10, 2008, 9:01am UTC](https://forum.kirupa.com/t/help-needed-with-scrolling-images-on-website/277282/1 "2008-12-10T09:01:14Z")

</div>

Hi there,

We have developed a website and at the very final stage the client has decided they are not happy with the speed that the images scroll. We cannot work out how to change the code to slow down the speed that the images are scrolling. I also want to have the mouse activate the images only when the mouse is over the images (scrolling area) and not over the entire website. This is the code we have on the movieclip.

stop();  
xm = 0;  
//function to set the xpos of the movieclip  
function xpos(bar\_length,mul)  
{  
hpos = -200;  
scroll\_length =35;  
incr = bar\_length/scroll\_length;  
xm = \_xmouse;  
//the amount the mouse needs to move to scroll.  
//so the top one is the x posion where it starts on the left, and the bottom one the right.  
if(\_xmouse \<= -200){xm = -200;}  
if(\_xmouse \>= 300){xm = 300;}  
scroll\_x = hpos - xm;  
scroll\_x = scroll\_x \* mul;  
x\_pos = scroll\_x \* incr;  
x\_pos = x\_pos + hpos;  
return x\_pos;  
}

\_root.onEnterFrame = function ()  
{

// call function xpos  
x\_pos = xpos(500,.20);  
with (bar)  
{  
\_x += (x\_pos - \_x)\*.4;  
}

// call function xpos  
x\_pos = xpos(500,.75);  
with (menu)  
{  
\_x += (x\_pos - \_x)\*.4;  
}

}

The movieclip we are loading into a level on the main movie. you can see the site at [www.mediamache.com/loudfire](http://www.mediamache.com/loudfire).

Any help would really be appreciated.

Thanks,

Adam.
