# Dynamically limit scroll length

**URL:** https://forum.kirupa.com/t/dynamically-limit-scroll-length/204910
**Category:** Uncategorized
**Created:** [October 24, 2006, 3:28pm UTC](https://forum.kirupa.com/t/dynamically-limit-scroll-length/204910 "2006-10-24T15:28:39Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![lenfest](https://avatars.discourse-cdn.com/v4/letter/l/e480ec/32.png) [@lenfest](https://forum.kirupa.com/u/lenfest)
#### Post date: [October 24, 2006, 3:28pm UTC](https://forum.kirupa.com/t/dynamically-limit-scroll-length/204910/1 "2006-10-24T15:28:39Z")

</div>

I am trying to limit the length of my scrolling menu to the total width of my menu movie clip, which is dynamically from an xml file. I can get it to scroll just fine, the only problem is that it will keep scrolling even when the movie clip has moved off screen. Any thoughts?

on(press, release, keyPress “\<left\>”)  
{  
thumbnails.\_x += 30;  
}
