trigger animation

i want to play an animation once the player hits a collider. i tried using this:
if(collider.tag == “anim_trigger1”)
{
this.transform.GetComponent(Animation).animation.Play (“enemy”);
}

where “anim_trigger1” is the tag of the collider and “enemy” is the name of the animation applied on another object.
And i’m getting the following error:
"*Assets/script/player_control. j s(38,72): B C E 0 144: ‘Unity Engine .Component.animation’ is obsolete. Property animation has been deprecated. Use Get Component() instead. "…

thanks in advance

The problem is accessing .animation again and also in a wrong way. You don’t need to write it you can simply play animation using code like this.

this.GetComponent<Animation>().Play ("enemy");
i tried as you suggested , but i got these following three errors:

Assets/script/player_control.js(38,62): BCE0043: Unexpected token: ).
Assets/script/player_control.js(38,63): BCE0044: expecting ), found '.'.
Assets/script/player_control.js(38,64): UCE0001: ';' expected. Insert a semicolon at the end.