# Brownie: a question for ya

**URL:** <https://forum.kirupa.com/t/brownie-a-question-for-ya/111587>\
**Category:** Uncategorized\
**Created:** [May 28, 2004, 4:47pm UTC](https://forum.kirupa.com/t/brownie-a-question-for-ya/111587 "2004-05-28T16:47:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnerickvs](https://avatars.discourse-cdn.com/v4/letter/j/db5fbb/32.png) [@johnerickvs](https://forum.kirupa.com/u/johnerickvs)\
**Post date:** [May 28, 2004, 4:47pm UTC](https://forum.kirupa.com/t/brownie-a-question-for-ya/111587/1 "2004-05-28T16:47:39Z")

</div>

I’ve used the scrollbar.FLA you submitted days ago in this very forum, but I had an issue; when scrolling down using de “down arrow button” the dragger doesn’t stop, instead it continues scrolling down… i really don’r know how to fix it…  
I appreciate your help… thanks

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 28, 2004, 5:00pm UTC](https://forum.kirupa.com/t/brownie-a-question-for-ya/111587/2 "2004-05-28T17:00:29Z")

</div>

> [@johnerickvs](#):
>
> I’ve used the scrollbar.FLA you submitted days ago in this very forum, but I had an issue; when scrolling down using de “down arrow button” the dragger doesn’t stop, instead it continues scrolling down… i really don’r know how to fix it…  
> I appreciate your help… thanks

Please elaborate so we can help you 😉

Sounds to me like the variables storing the boundary values of the clip to be scrolled arn’t set or set correctly, i.e. the height and width of the scrollable area.

Please post some code.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 28, 2004, 5:19pm UTC](https://forum.kirupa.com/t/brownie-a-question-for-ya/111587/3 "2004-05-28T17:19:03Z")

</div>

fscommand(“allowscale”, “false”);  
bar.useHandCursor = dragger.useHandCursor=false;  
space = 20;  
friction = 0.9;  
speed = 4;  
y = dragger.\_y;  
top = main.\_y;  
bottom = main.\_height-main.\_y+space;  
dragger.onPress = function() {  
drag = true;  
this.startDrag(false, this.\_x, this.\_parent.y, this.\_x, this.\_parent.y+this.\_parent.bar.\_height-this.\_height);  
scrollEase();  
};  
dragger.onMouseUp = function() {  
this.stopDrag();  
drag = false;  
};  
bar.onPress = function() {  
drag = true;  
if (this.\_parent.\_ymouse\>this.\_y+this.\_height-this.\_parent.dragger.\_height) {  
this.\_parent.dragger.\_y = this.\_parent.\_ymouse;  
this.\_parent.dragger.\_y = this.\_y+this.\_height-this.\_parent.dragger.\_height;  
} else {  
this.\_parent.dragger.\_y = this.\_parent.\_ymouse;  
}  
scrollEase();  
};  
bar.onMouseUp = function() {  
drag = false;  
};  
moveDragger = function (d) {  
if ((dragger.\_y == y+bar.\_height-dragger.\_height && d == 1) || (dragger.\_y == y && d == -1)) {  
clearInterval(myInterval);  
} else {  
dragger.\_y += d;  
scrollEase();  
updateAfterEvent();  
}  
};  
up\_btn.onPress = function() {  
myInterval = setInterval(moveDragger, 18, -1);  
};  
down\_btn.onPress = function() {  
myInterval = setInterval(moveDragger, 18, 1);  
};  
up\_btn.onMouseUp = down\_btn.onMouseUp=function () {  
clearInterval(myInterval);  
};  
MovieClip.prototype.scrollEase = function() {  
dragger.onEnterFrame = function() {  
if (Math.abs(dy) == 0 && drag == false) {  
delete this.onEnterFrame;  
}  
r = (this.\_y-y)/(bar.\_height-this.\_height);  
dy = Math.round((((top-((bottom-top)\*r))-main.\_y)/speed)\*friction);  
main.\_y += dy;  
};  
};

\*\*That’s all the code the animation has!.. 😉

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 28, 2004, 5:34pm UTC](https://forum.kirupa.com/t/brownie-a-question-for-ya/111587/4 "2004-05-28T17:34:33Z")

</div>


