onPress loop

Another probelm im having is how to get a scroll like effect so that when the user presses a button on my swf it loops its command until the button is released. (an extension to the kirupa’s photo gallery.)

here’s what i have so far.

 
scroll_right_btn.onPress = function() { 
  var hold:Boolean
  hold = true;
  while(hold) {
   this.createEmptyMovieClip("tscroller", 1000); 
   scroll_speed = 10; 
   thumbnail_mc._x -= scroll_speed;
   delete tscroller.onEnterFrame; 
   scroll_right_btn.onRelease = function() {
	hold = false;
   }
  }
}; 

this creates an endless loop on loading and crashes the flashplayer, any help appreciated.

cheers, stib