Add functionality to loop animation continuously, and stop it.