this is pretty hard to read.
but presumably if you want to stop the car before it goes off the screen, you have to stop it. Three immediate ideas come to mind..
- you could stop the loop before it gets there, or make the loop condition contain information to stop it, eg for(whatever, carposition on screen && other cond, something++) type setup.
-you can check to see if it is going to go off the screen and not move it any more (same idea, but now check in the loop, not in the condition, and keep looping even if it would go off, maybe because you do other stuff that should not stop even if the car stops, like maybe a bird is flying around also and you want to animate that but stop the car, etc)
- you could use an imposter, so if you detect the car went off the screen you draw a stunt double in a fixed location. This is sometimes used in 3-d graphics where a scene is put in the background instead of 3-d objects for performance; the scene can be a movie/frames even, but its not doing all that 3-d computation stuff.