clearInterval() Issues

Ok.

So I’m trying to help a friend. He has this code that works except that he and I can’t figure out why it’s not clearing the interval. Here’s the code:

if (playPause == undefined) {
 	playPause = false;
 }
 var rightPause;
 //Auto Scroll
 function moveLeft() {
 	ScrollSpeed = 5;
 	moviePos = Math.round(moviePos-ScrollSpeed);
 }
 function moveRight() {
 	if (playPause == true) {
 		rightPause = setInterval(rightWait, 3000);
 	}
 	rightWait = function() {
 		trace("In the Loop");
 		ScrollSpeed = 5;
 		moviePos = Math.round(moviePos+ScrollSpeed);
 		playPause = false;
 		clearInterval(rightPause);
 		break;
 	};
 }
 if (moviePos>Leftstop) {
 	moviePos = lmax;
 	ende = "yes";
 	playPause = false;
 }
 if (moviePos<Rightstop) {
 	moviePos = rmax;
 	ende = "no";
 	playPause = true;
 }
 
 if (ende == "yes") {
 	moveLeft();
 	clearInterval(rightPause);
 } else if (ende == "no"){
 	moveRight();
 }
 mc_signs._x = moviePos;

That is the code that does all the work. So, the movie scrolls from the left to the right, and back. Once it gets back to it’s starting position the clip starts to “vibrate” from side to side by 5px. I traded the interval and it never gets cleared. It also never leaves the loop rightWait.

Any help you can offer would be greatly appreciated.

~Brett