Calculate endlimit in a scrolling

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; //

}