Home

# Class goog.fx.CssSpriteAnimation

This animation class is used to animate a CSS sprite (moving a background image). This moves through a series of images in a single image sprite and loops the animation when donw. You should set up the {@code background-image} and size in a CSS rule for the relevant element.

extends goog.fx.Animation

Instance Method Summary
| `clearSpritePosition()` Clears the background position style set directly on the element by the animation. Allows to apply CSS styling for background position on the same element when the sprite animation is not runniing.
| `disposeInternal()` Disposes of the animation. Stops an animation, fires a 'destroy' event and then removes all the event handlers to clean up memory.
| `onAnimate()` Dispatches the ANIMATE event. Sub classes should override this instead of listening to the event.
| `onFinish()` Dispatches the FINISH event. Sub classes should override this instead of listening to the event, and call this instead of dispatching the event.