Animation component in Unity 4.3 doesn't work?

The new Unity animation method has totally confused me. I used to have version 4.0.1 and this script worked perfectly fine with animations.

var someNumber : System.Decimal;
someNumber = 0;
animation["Name"].speed = someNumber;

function OnTriggerEnter(other : Collider){
	if(other.tag == "Name");
	someNumber = 1;
	animation["Name"].speed = someNumber;

I attached this script and the Animation component to the object and it worked fine. Now I’ve upgraded to version 4.3.2 and now creating new triggered animations won’t work because it uses the Animator component which seems to ignore this script completely. I basically need to now how to exchange the Animator component for the Animation component without it saying it can’t find the animation, or is it the script that has to be changed? Thanks for any answers.

Try marking your animation as legacy like shown HERE

Just replace the Animator component with an Animation component.

(right-click “Animator” in inspector, remove component; add component, type “Animation”)