weapon sprint animation problem...

Hi.
I have created this script, which controls the walking, sprinting and idle animations that are attached to my weapon.

static var walking : boolean=false;
static var sprinting : boolean=false;

function Update () {
	if(walking==true){
		animation.CrossFade("walk");
	}
	if(sprinting==true){
		animation.CrossFade("sprint",0.2);		
	}
	if(walking==false && sprinting==false){	
		animation.CrossFade("idle");
	}
}

Another script controls the walking and sprinting booleans. When the sprinting animation is CrossFaded it plays about half of the animation clip, then glitches between the sprinting and walking poses.
Youtube Video Of The Problem…

Is it possible that both are true? I’d suggest making the second and third if statement “else if” instead. Then also verify that you can’t be both walking and sprinting. You would probably be better of using an enum rather than booleans to maintain state with more than two possibilities.