Hi,
This is fundemental to how Unity works. I suggest looking into some Unity tutorials on how to bind components to your script. You can also do it like this, where you attach this script to the object with the animated sprite.
var animSprite : tk2dAnimatedSprite;
animSprite = GetComponent(tk2dAnimatedSprite);
function OnTriggerEnter(other : Collider)
{
if(other.transform.tag=="Player")
{
animSprite.Play("WasserSplash");
}
}
I'm guessing you've run "Set up for JS" as the error you're seeing implies that, but if you haven't you should run it first.