# Scrolling movie clip with buttons

**URL:** <https://forum.kirupa.com/t/scrolling-movie-clip-with-buttons/187053>\
**Category:** Uncategorized\
**Created:** [April 26, 2006, 12:23pm UTC](https://forum.kirupa.com/t/scrolling-movie-clip-with-buttons/187053 "2006-04-26T12:23:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jclement14](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/jclement14/32/2406_2.png) [@jclement14](https://forum.kirupa.com/u/jclement14)\
**Post date:** [April 26, 2006, 12:23pm UTC](https://forum.kirupa.com/t/scrolling-movie-clip-with-buttons/187053/1 "2006-04-26T12:23:12Z")

</div>

Hi, I have a horizontal movieclip that I want to scroll. I want to use two arrows that I’ve made; one facing left and one facing right. When I click down on the arrows I want the movie clip to continue to scroll till either it gets to the end or till the user releases the arrow.  
The script i have on the movie clip is:  
on(load)  
{  
left = false;  
right = false;  
maxL = someNumber;  
maxR = someOtherNumber;

}  
on(enterFrame)  
{  
if(left)  
{  
if(this.\_x \> maxL)  
{  
this.\_x +=1;  
}  
}else if (right)  
{  
if(this.\_x \< maxR)  
{  
this.\_x -=1;  
}  
}  
}

and the script on the buttons is:

on(press)  
{  
\_parent.movieclip.left = true;  
}  
on(release)  
{  
\_parent.movieclip.left = false;  
}

I found the script on another site, but when i use it and export the movie nothing happens, the buttons don’t work… if anyone could please help i would really appreciate it… i’m not very actionscript literate (i know all the basics) and have been struggling with this and going through similar scrolling tutorials for ages :stare: , if it helps the page i’m eventually going to make work is [http://www.jeanetteclement.co.uk/chrisdye/gallery](http://www.jeanetteclement.co.uk/chrisdye/gallery) the movieclip will be the background with the picture thumbnails…
