Animation Rewind does not set object back to original state

Is this supposed to set the object like it is when on frame 0? i tried using this:

function rewindAllAnimation()
{
    for (var i : int = 0; i < gameObjectsToRewind.length; i++)
    {
          gameObjectsToRewind*.transform.animation.Rewind();*
 *}*
*}*
*```*
*<p>I was hoping that the objects im trying to rewind would return to their state before played animations. Is this the right way to go about doing this?</p>*
*<p>EDIT</p>*
*<p>I have noticed that if i call the rewind function WHILE the animation is playing, it resets it to its first frame, but continues to play to the end again. If i call this after it has completed animating it does nothing... WHAT AM I MISSING!?  This seems like it should be so simple. Please point out my newbie mistake :)</p>*

Rewind() sets the time to 0. It does not do anything else. If a clip was playing, it will keep playing but from the beginning. If a clip was not playing, it will still not be playing (but it will start from time 0 next time you start it).

Well I think that if you called `animation.Stop` in the same place where you rewind it, then the animation wouldn't keep playing.

If you want to resume your animation later on, use animationState.speed = 0; To resume it, animationState.speed = 1;

BTW, it's a common mistake confusing animation (collection of animations) with animationState (the actual, individually named "clip"), make sure you're accessing the right one.

Good luck!