Movement not smooth

Hi,

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

 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