orbit mouse camera animation movement script

ok i have this
script from unity guide

function Update () {
if (Input.GetAxis(“Vertical”) > 0.2)
animation.CrossFade (“walk”);
animation.CrossFade (“idle”);

  is attached with the mouse orbit camera 

so when i move forward it animates and when i stop moving
it makes the idle animation. the problem is when i move backwards
or side to side, it doesn´t perform the right animation

sorry im a 3d artist not a programer…

You could use mecanim and a blend tree to swtich from idle animation to walk animation with the parameter speed…