# Ease : pixels instead of \_y

**URL:** <https://forum.kirupa.com/t/ease-pixels-instead-of--y/122288>\
**Category:** Uncategorized\
**Created:** [September 12, 2004, 2:30pm UTC](https://forum.kirupa.com/t/ease-pixels-instead-of--y/122288 "2004-09-12T14:30:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Voccart](https://avatars.discourse-cdn.com/v4/letter/v/ea5d25/32.png) [@Voccart](https://forum.kirupa.com/u/Voccart)\
**Post date:** [September 12, 2004, 2:30pm UTC](https://forum.kirupa.com/t/ease-pixels-instead-of--y/122288/1 "2004-09-12T14:30:21Z")

</div>

hi people

i’m using the following code to ease mc’s

```php
 
MovieClip.prototype.easingY = function(toY){
 this.onEnterFrame = function(){
 this._y -= (this._y-toY)/3;
 if(this._y > toY-4 && this._y < toY+4){
 this._y = toY;
 delete this.onEnterFrame 
 } } }

```

now i have to provide a Y position to move to…is it possible to change this code so that instead of providing a Y position i give it a amount of pixels to move (up/down)? ex. move 100 pixels UP from current y or move 222 pixels down…

thanks
