var interval:Number onMouseDown = function(){ interval = setInterval(myFunction,200); } onMouseUp = function(){ clearInterval(interval) }