#pragma strict

function Start () {

}

function Update () {
if ( Input.GetAxisRaw( "Horizontal" ) || Input.GetAxisRaw( "Vertical" ) )
animation.CrossFade("nameofyouranimation");
}