playing a different animation in an array

i have a series of animations of a gear stick and want to cycle through them by pressing a guy button. i have successfully done this with an array of materials but i am struggling to do the same with the animations. below is my attempt at the code. i would be grateful for any help, thank you

var gearIndx : int;
var gears : AnimationClip[];
var car : GameObject;

function OnGUI(){

if(GUI.Button(Rect(10,10,50,50),gearTex)){
gearIndx++;

}

}

function Update(){

car.animation = gears[gearIndx];

}

You need to set the clip and to play the animation…
http://unity3d.com/support/documentation/ScriptReference/Animation.html

car.animation.clip = gears[gearIndx];
car.animation.Play();

Or you can do:

car.animation.Play("clipname", PlayMode.StopAll);