Example of how to pause an animation