var timer:*; var delay:Number = 60; timer = setInterval(moveBall, delay); function moveBall():void { ball.x++; }