# Up / down easing scroll

**URL:** https://forum.kirupa.com/t/up-down-easing-scroll/173259
**Category:** Uncategorized
**Created:** [December 22, 2005, 7:21pm UTC](https://forum.kirupa.com/t/up-down-easing-scroll/173259 "2005-12-22T19:21:56Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![dirksmith](https://avatars.discourse-cdn.com/v4/letter/d/47e85d/32.png) [@dirksmith](https://forum.kirupa.com/u/dirksmith)
#### Post date: [December 22, 2005, 7:21pm UTC](https://forum.kirupa.com/t/up-down-easing-scroll/173259/1 "2005-12-22T19:21:56Z")

</div>

Hi

I’d like to adapt the basic easing menu system (see link below), with the current 6 menu buttons being replaced by just 2: up and down.

([http://www.detkendesign.com/easingcontentexample.htm](http://www.detkendesign.com/easingcontentexample.htm))

But I’m not sure how the up / down buttons would be coded to scroll along the y axis.

The current actionscript for the 6 menu button approach is shown below.

Grateful for any suggestions on the actionscript for the up / down buttons.

Thanx

Dirk

onClipEvent (load) {  
\_x = 0;  
\_y = 0;  
div = 5;  
}

onClipEvent (enterFrame) {  
\_x += (endX-\_x)/div;  
\_y += (endY-\_y)/div;

```
_root.home.onRelease = function() {
    endX = 0;
    endY = 0;
};
_root.works.onRelease = function() {
    endX = -250;
    endY = 0;
};
_root.skills.onRelease = function() {
    endX = -500;
    endY = 0;
};
_root.bio.onRelease = function() {
    endX = 0;
    endY = -200;
};
_root.links.onRelease = function() {
    endX = -250;
    endY = -200;
};
_root.contact.onRelease = function() {
    endX = -500;
    endY = -200;
};

```

}
