Stop 3D movement

Using the Kirupa script Rotate and Pan the Camera I built a ‘wall’ that loads pictures from the mysql database. In the left corner is a showcase that can be zoomed in by using the JoeAndTheCamera script. All moves pretty well, actually a bit too well. If visitors keep pressing the keys (and curious as they are I am sure they will) the wall leaves the screen. No matter where I put a ‘stop’- script the wall cannot be stopped… tried to make it load a new movie at some _x value, but without succes. Tried the “constrainedMove”- function mentioned in the forum, but this script leaves no possibility for the visitor to click and enlarge the pictures on the wall as they speed by. Does anyone have any ideas how to keep up the movement in steps but stop the wall before it leaves the screen ?

walkAround = function(){
var movement = 0;
if (Key.isDown(Key.UP))
movement += 250;
if (Key.isDown(Key.DOWN)) movement -= 250;

cameraView.x += Math.sin(cameraView.rotation)*movement;
cameraView.z += Math.cos(cameraView.rotation)*movement;

for (var i=0; i<objectsInScene.length; i++){
objectsInScene*.display(cameraView, focalLength);
}