Avoid invisible purpose. We like to see that our kids are alive and kicking. But too much Active X, Future Splash, and Java mumbo can distract. One example of useful animation is a site advertising a cellist's services. The site showed an animated cellist, with audio reinforcement.
Animation triggers a reflex response from the eye.
Readers are literally forced to look at it. Therefore, avoid gratuitous movement because it detracts from the other elements you want seen. Question that marquee and rotating button. Avoid invisible buttons. Button down the hatches.