# Movement not smooth

**URL:** https://forum.kirupa.com/t/movement-not-smooth/130654
**Category:** Uncategorized
**Created:** [December 7, 2004, 8:14am UTC](https://forum.kirupa.com/t/movement-not-smooth/130654 "2004-12-07T08:14:08Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![dboers](https://avatars.discourse-cdn.com/v4/letter/d/bbe5ce/32.png) [@dboers](https://forum.kirupa.com/u/dboers)
#### Post date: [December 7, 2004, 8:14am UTC](https://forum.kirupa.com/t/movement-not-smooth/130654/1 "2004-12-07T08:14:08Z")

</div>

Hi,

I have the following script in both frame 1 and 2 to let a movieclip move from right to left on the stage:

```auto
 speed =-5
name._x += speed
if (name._x<-500) {
name._x = 250;
} 

```

And the clip is indeed moving from right to left on the stage and when it reaches \_x -550 it is going back to it’s starting position \_x 250 only the movement isn’t smooth at all.

What should I do to make the movement more smooth or should I use a completely different script?

Thanks in advance
