play animation when thrown object collides

new to unity and terrible at javascript. trying to do some basic stuff with triggering an objects animation when it collides with a box I’m throwing. I’ve tagged my stuff, done everything proper, but can’t get script to do what i need. here is the script:

var speed = 3.0;
var boxy:Transform;
var doorOpened : boolean = false;

 var other : Animation ;

function Update() { 

if(Input.GetButtonDown("Fire1"))
{

var crate = Instantiate (boxy, transform.position, Quaternion.identity);

crate.rigidbody.AddForce(transform.forward * 2000);

}
}

function OnControllerColliderHit(hit:ControllerColliderHit) { 
    if((hit.gameObject.tag == "ballboy") && !doorOpened)
        (hit.gameObject.tag =="boxy");
}

function openDoor(drill : GameObject) {
    doorOpened = true;                
    drill.animation.Play("spin");
}

I’ve grabbed some random code i found, so the variables won’t make sense. i want to cause a sphere floating in space to kick back (kick back is the animation) when my “boxy” (box thrown) hits it. help greatly appreciated.

Take this out:

function OnControllerColliderHit(hit:ControllerColliderHit) { 
    if((hit.gameObject.tag == "ballboy") && !doorOpened)
        (hit.gameObject.tag =="boxy");
}

You want a script on the object-getting-hit, OnCollisionEnter (see http://unity3d.com/support/documentation/ScriptReference/Collider.OnCollisionEnter.html)
that will start the animation on that object.