# How to ease a paralx to a stop

**URL:** <https://forum.kirupa.com/t/how-to-ease-a-paralx-to-a-stop/281562>\
**Category:** Uncategorized\
**Created:** [February 10, 2009, 6:47pm UTC](https://forum.kirupa.com/t/how-to-ease-a-paralx-to-a-stop/281562 "2009-02-10T18:47:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![billy\_nugz](https://avatars.discourse-cdn.com/v4/letter/b/b9bd4f/32.png) [@billy\_nugz](https://forum.kirupa.com/u/billy_nugz)\
**Post date:** [February 10, 2009, 6:47pm UTC](https://forum.kirupa.com/t/how-to-ease-a-paralx-to-a-stop/281562/1 "2009-02-10T18:47:03Z")

</div>

Ok so basicaly I have 2 images moving back and forth to a certain point. However when they get to that point they just stop. I would like them to come to a slow stop insted of just stoping on a dime. Can this be done? here is what Im doing.

```auto
stageWidth = Stage.width;
speed1 = 250;
speed2 = 200;

mc1Width = front_mc._width;
mc2Width = back_mc._width;
mc1Height = front_mc._width;
mc2Height = back_mc._width;

mc1X = front_mc._x;
mc2X = back_mc._x;
mc1Y = front_mc._y;
mc2Y = back_mc._y;

lock_scroll = false;
_root.onEnterFrame = function() {
   if (!lock_scroll) {
      scroll_mcx();
   }
   scroll_mcy();
};

function scroll_mcx() {
   var xdist = _xmouse-(stageWidth/2);
   mc1X += -xdist/speed1;
   mc2X += -xdist/speed2;
   if (mc1X>=0) {
      mc1X = 0;
   }
   if (mc1X<=stageWidth-mc1Width) {
      mc1X = stageWidth-mc1Width;
   }
   if (mc2X>=0) {
      mc2X = 0;
   }
   if (mc2X<=stageWidth-mc2Width) {
      mc2X = stageWidth-mc2Width;
   }
   setProperty("front_mc", _x, mc1X);
   setProperty("back_mc", _x, mc2X);
}

function scroll_mcy() {
   var xdist = _xmouse-(stageWidth/2);
   mc1X += -xdist/speed1;
   mc2X += -xdist/speed2;
   if (mc1X>=0) {
      mc1X = 0;
   }
   if (mc1X<=stageWidth-mc1Width) {
      mc1X = stageWidth-mc1Width;
   }
   if (mc2X>=0) {
      mc2X = 0;
   }
   if (mc2X<=stageWidth-mc2Width) {
      mc2X = stageWidth-mc2Width;
   }
   setProperty("front_mc", _x, mc1X);
   setProperty("back_mc", _x, mc2X);
}

//create an empty mc container for content to display
createEmptyMovieClip("content_box",200);
content_box._x = 195;
content_box._y = 92;

```

Thanks for any help
