Smooth button animation after rolling out and back over?

I notice some sites have button animations that complete playing even after you roll out and even back over them. Are there any tutorials on how this effect can be done?

I know how to make a MC that loops the previous frame of an animation and I assume this is how they get the button animation to play backwards on rollout but how can one stop it from starting again of you roll over and the previous animation is still playing?

I hope that was not too confusing. Appreciate any info on the subject.

Cheers