# Problem with Scroller AS, please help!

**URL:** <https://forum.kirupa.com/t/problem-with-scroller-as-please-help/162909>\
**Category:** flash\
**Created:** [September 17, 2005, 3:21pm UTC](https://forum.kirupa.com/t/problem-with-scroller-as-please-help/162909 "2005-09-17T15:21:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Theros](https://avatars.discourse-cdn.com/v4/letter/t/e5b9ba/32.png) [@Theros](https://forum.kirupa.com/u/Theros)\
**Post date:** [September 17, 2005, 3:21pm UTC](https://forum.kirupa.com/t/problem-with-scroller-as-please-help/162909/1 "2005-09-17T15:21:24Z")

</div>

```auto
panel.onRollOver = panelOver;

function panelOver() {
	this.onEnterFrame = scrollPanel;
	delete this.onRollOver;
}

var b = stroke.getBounds(_root);

function scrollPanel() {
	if(_ymouse<b.yMin || _ymouse>b.yMax || _xmouse<b.xMin || _xmouse>b.xMax) {
		this.onRollOver = panelOver;
		delete this.onEnterFrame;
	}
	
	
	if(panel._y <= -743.9) {
		panel._y = -743.9;
	}
	
	if(panel._y >= 78.1) {
		panel._y = 78.1;
	}
	
	var ydist = _ymouse - 250;
	
	panel._y += Math.round(-ydist / 7);
}
	
	
	
	
	
	

```

There is my code from the tutorial on [GoToLearn.com](http://GoToLearn.com) on the Scrolling Thumbnail Tutorial. My problem is that I changed it to up up and down now, that works, except when I try to put the code in to stop it from infinity scrolling, it just messes everything up?

```auto
	if(panel._y <= -743.9) {
 		panel._y = -743.9;
 	}
 	
 	if(panel._y >= 78.1) {
 		panel._y = 78.1;
 	}

```

Whats wrong?
