Make the animation pause and resume along with the buttons