# Ease : pixels instead of \_y

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

---

<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:** [September 12, 2004, 6:47pm UTC](https://forum.kirupa.com/t/ease-pixels-instead-of--y/64008/2 "2004-09-12T18:47:00Z")

</div>

lol

i found the answer 😃 [HERE](http://www.kirupaforum.com/forums/showthread.php?t=44403&page=2&pp=15&highlight=bounce)…I did read that post like 5 times yesterday and did not see it!!! realy stupid… need sleep
