# Ease MC on key release ... Help!

**URL:** https://forum.kirupa.com/t/ease-mc-on-key-release-help/193127
**Category:** flash
**Created:** [July 4, 2006, 3:53pm UTC](https://forum.kirupa.com/t/ease-mc-on-key-release-help/193127 "2006-07-04T15:53:16Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Largo](https://avatars.discourse-cdn.com/v4/letter/l/41988e/32.png) [@Largo](https://forum.kirupa.com/u/Largo)
#### Post date: [July 4, 2006, 3:53pm UTC](https://forum.kirupa.com/t/ease-mc-on-key-release-help/193127/1 "2006-07-04T15:53:16Z")

</div>

Hi, Im trying to get this code to work … The idea is the when I **press** the “w” key, the MC will move _ **up Y\_axis** _ and when I \*\*release \*\*the “w” key the MC _ **eases** _ a little bit further …

Can anyone help …:)?

the MC(walker) code:

```auto
onClipEvent (load) {
    speed = 2;
 dist = 100;
    var keylistener:Object = new Object();
    Key.addListener(keylistener);
    keylistener.onKeyUp = function(){
        switch(Key.getAscii(119)){
            case Key.UP :
             new mx.transitions.Tween(this,"_y",mx.transitions.easing.Strong.easeOut,this._y,(this._y-dist),3,true);
            break;
            case Key.DOWN :
                this.moveT("_y", -speed);
            break;
        }
    }
}

```

The keyframe code:

```auto
MovieClip.prototype.moveT = function(point, amount) {
 this[point] += amount;
 walker[point] += amount;
};

```
