Detect touch on a specific GUITexture

Greetings, guys.
While i’m working on my Unity3d Android project, i bumped into one thing, that I can’t do properly.
I’m creating an interface, and I have 2 GUITextures, each one represents a button. UP and DOWN.
When I tap on one, animation plays well, but Unity does not count another GUITexture as separate button. So when I press it, it works like first button. Here is some code:


Code for button UP

function Update () {
  if(Input.touchCount >= 1)
{
    var touch : Touch = Input.touches[0];

    if(touch.phase != TouchPhase.Ended && touch.phase != TouchPhase.Canceled)
    {
        animation["UP"].speed= 1.0;
      animation.Play("UP");
    }
    else
    {
        animation["UP"].speed= 0;
    }
}
}

Code for button DOWN

function Update () {
      if(Input.touchCount >= 1)
    {
        var touch : Touch = Input.touches[0];
    
        if(touch.phase != TouchPhase.Ended && touch.phase != TouchPhase.Canceled)
        {
            animation["UP"].speed= -1.0;
          animation.Play("UP");
        }
        else
        {
            animation["UP"].speed= 0;
        }
    }
    }

Im fact, I know, that i need to use “hit.test” method, but I dunno how to make it right.
Thanks for your attention

function Start()
{
var hit : GUILayer = Camera.main.GetComponent(GUILayer);
}

function Update()
{
    var hitObject : GUIElement = hit.HitTest( Input.mousePosition );

    if( hitObject != null )
    {
        switch( hitObject.name )
        {
            case "guiTexture_name1":
            // do stuff
                break;
            default:
                break;
        }
    }
}

If you use the GUI.Button you will have more control over what buttons are being touched. The buttons will automatically react to touch inputs, which is really nice because you don’t have to constantly be checking for a touch input. This is what I would do.

void OnGUI(){
     if(GUI.Button(new Rect(0,0,50,30), "Up"){
          //play animation up
     }
     if(GUI.Button(new Rect(0,40,50,30), "Down"){
          //play animation down
     }
}

I have another question (as I deal with previous). This script works only once, I mean when I want to play animation again and tap the button…nothing happend. What I need to add to my script?

function Update() {

 var ray: Ray = Camera.main.ScreenPointToRay(Input.mousePosition);
 var hit: RaycastHit;
    
 if (Input.GetMouseButtonDown(0) && Physics.Raycast(ray, hit, 100))
   {
    if (hit.collider.gameObject.tag == "newgame") 
     {
        animation.Play("newgame");
     }   
    
        }
    
    }