Easing mc scroll with buttons (no bar)

Ok. I already posted this to the Actionscritp Forum (is that bad? :*() but it seems like nobody’s hanging out there today. So…

I’m trying to learn a better way to make a mc scroller with up/down buttons that scroll onPress and stop scrolling onRelease, but ease into place.

I’m using this on the first frame:

[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]

welll i dont know if this is the best way but how about instead of using to much AS you do it a little more easy.
use masks. and 2 buttons… the up and a down…
make a MC with a motion tween that the text goes up. and make another one to go down
and in each of the buttons insert actions to call does movie clips.
on release _root ( the name of ur MC ) gotoandplay 2 ( thats the frame when it will start because on ur first frame un need to have a stop; and the same to your other button… hope it helps… if u have a question write me back !:slight_smile:

Snaxs,
Thanks for your reply, but I don’t think your version will be able to ease itself to a hault depending on where the user releases. I’m all for simplification though. If you think of anything else let me know.

I’m really into moving stuff with AS now. It’s so smooth!