# Calculate endlimit in a scrolling

**URL:** <https://forum.kirupa.com/t/calculate-endlimit-in-a-scrolling/90227>\
**Category:** flash\
**Created:** [May 16, 2005, 3:43am UTC](https://forum.kirupa.com/t/calculate-endlimit-in-a-scrolling/90227 "2005-05-16T03:43:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![NovemberRain](https://avatars.discourse-cdn.com/v4/letter/n/73ab20/32.png) [@NovemberRain](https://forum.kirupa.com/u/NovemberRain)\
**Post date:** [May 16, 2005, 3:43am UTC](https://forum.kirupa.com/t/calculate-endlimit-in-a-scrolling/90227/1 "2005-05-16T03:43:39Z")

</div>

Here is a scrolling problem

I’m trying to scroll a movie clip with a custom made scroll bar. This is code on the movieclip to be scrolled for the initialisation. This is actually i’ve taken from a book. Anybody can explain how this endLimit calculates.

onClipEvent (load) {

maskHeight = 300;  
startLimit = this.\_y;

endLimit = this.\_y - this.height + maskHeight; //

}
