Altering x position of movie clip dynamically


I’ve built a little experiment which lets the user control a car with the fwd and bckwrd arrow keys. the idea is to move the car fwd but if it goes above a certain speed you have to slow it down. I have it working but the way i’ve done it is to move the backround to make it look like the car is moving. However, the backround can only be a certain width so atfer a while is moves clear of the screen. I’m trying to have it so that when the road’s _x coordinate hits a certain point then it will jump back to its original point and the road will look like its just continuously moving. Here is the main code.

[color=blue]onClipEvent (load){
//dir = 0;
speed = 0;
[color=blue]onClipEvent (enterFrame) {
xspeed = Math.cos(dirMath.PI/180)speed;
yspeed = Math.sin(dir
_x += xspeed;
_y += yspeed;
//_rotation = dir; [/color]
[color=blue]if (Key.isDown(Key.RIGHT)) {
speed += -1;
if (speed<=0){
if (Key.isDown(Key.LEFT)) {
speed += 1;
[color=blue]if (speed<0) {
_root.caption.carspeed = -1
if (speed>=0){
_root.caption.carspeed = 1
[color=blue]if (speed<12){ = “SAFE”;
elseif (speed>=12) = “DANGER”;
[color=black]This is the bit where I tried to get the _x value to change:[/color]
_x =+ 3104;


I’ve attatched my .fla to help explain!
[color=black]I think i’m totally wrong and would greatly appreciate some help![/color]