Factorize busy animation code.