var speed:Number=2.5; function dviz(){ _root.ball_mc._y-=speed; speed-=0.01; if(_root.ball_mc._y>600){ clearInterval(timerID); } } _root.ball_mc.onEnterFrame=function(){ if(Key.isDown(Key.UP)){ var timerID=setInterval(dviz,12); } }