# Scroll doesn't stop :(

**URL:** https://forum.kirupa.com/t/scroll-doesnt-stop/98738
**Category:** Uncategorized
**Created:** [January 10, 2004, 11:06am UTC](https://forum.kirupa.com/t/scroll-doesnt-stop/98738 "2004-01-10T11:06:27Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Phat7](https://avatars.discourse-cdn.com/v4/letter/p/6de8d8/32.png) [@Phat7](https://forum.kirupa.com/u/Phat7)
#### Post date: [January 10, 2004, 11:06am UTC](https://forum.kirupa.com/t/scroll-doesnt-stop/98738/1 "2004-01-10T11:06:27Z")

</div>

I wrote this code for scrolling content:

```auto
onClipEvent (mouseDown) {
	if (this.hitTest(_root._xmouse, _root._ymouse)) {
		var uppressed = true;
		updateAfterEvent();
	}
}
onClipEvent (enterFrame) {
	if (uppressed) {
		if (count != 125) {
			_parent._parent.news._y -= 5;
			count += 5
		}
	}
	updateAfterEvent();
}
onClipEvent (mouseUp) {
	uppressed = false;
	updateAfterEvent();
}

```

and for opposite:

```auto
onClipEvent (mouseDown) {
	if (this.hitTest(_root._xmouse, _root._ymouse)) {
		var dnpressed = true;
		updateAfterEvent();
	}
}
onClipEvent (enterFrame) {
	if (dnpressed) {
		if (count != 0) {
			_parent._parent.news._y += 5;
			count -= 5
		}
	}
	updateAfterEvent();
}
onClipEvent (mouseUp) {
	dnpressed = false;
	updateAfterEvent();
}

```

When I scroll down it works and stops when count reaches 125, but when I scroll up it doesn’t stop and scrolling down doesn’t work anymore… Any help?.. ☹
