Setting isAnimating when the animation begins.