var interval = setInterval(function() { mc._rotation-=10; }, 1000); button.onPress = function(){ clearInterval(interval); }