# Scroll, onRelease stop scroll (mx)

**URL:** <https://forum.kirupa.com/t/scroll-onrelease-stop-scroll-mx/21592>\
**Category:** Uncategorized\
**Created:** [May 23, 2003, 3:48pm UTC](https://forum.kirupa.com/t/scroll-onrelease-stop-scroll-mx/21592 "2003-05-23T15:48:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![smacklemore](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@smacklemore](https://forum.kirupa.com/u/smacklemore)\
**Post date:** [May 23, 2003, 3:48pm UTC](https://forum.kirupa.com/t/scroll-onrelease-stop-scroll-mx/21592/1 "2003-05-23T15:48:35Z")

</div>

Hi there,  
I thought I would be able to find a tut somewhere for this, but amazingly no.

Does anyone know how to make a mc scroller that uses up and down buttons (no bar), that starts scrolling onPress and stops on onRelease… but eases into place wherever you happen to stop?

---

<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 23, 2003, 7:32pm UTC](https://forum.kirupa.com/t/scroll-onrelease-stop-scroll-mx/21592/2 "2003-05-23T19:32:32Z")

</div>

Well,  
I think I sort of answered my own question, but I doubt this is the best, most efficient way to do this.

I’m using this prototype:

[AS]MovieClip.prototype.easeScale = function (finalx, finaly, speed) {  
this.onEnterFrame =function () {  
this.\_x += Math.floor ((finalx- this.\_x )/speed);  
this.\_y += Math .floor ((finaly- this .\_y )/speed);  
if (Math.abs (this.\_y - finaly) \< .001) {  
delete this.onEnterFrame;  
}  
};  
};  
[/AS]

… and on the up button I have:

[AS]on (press) {  
fagraText\_mc.easeScale(0, 31, 9);  
}  
on (release, dragOut) {  
if (fagraText\_mc.\_y \>= 31){  
fagraText\_mc.easeScale(0, 31, 6);  
}  
else {  
fagraText\_mc.easeScale(0, (fagraText\_mc.\_y + 10), 6);  
}  
}[/AS]

…and on the down button:

[AS]on (press) {  
fagraText\_mc.easeScale(0, (fagraText\_mc.\_y - fagraText\_mc.\_height), 10);  
}  
on (release, dragOut) {  
fagraText\_mc.easeScale(0, (fagraText\_mc.\_y - 10), 6);  
}[/AS]

Does anyone have any suggestions?

---

<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 25, 2003, 12:49am UTC](https://forum.kirupa.com/t/scroll-onrelease-stop-scroll-mx/21592/3 "2003-05-25T00:49:14Z")

</div>

No, seriously. Does anyone have a better way to do this? Or is this just one of those questions that gets asked too much? If so, please point me to a tutorial and accept my appology for boring you.
