how do i trigger state machine ?

hi i would like to trigger a state animator.
i have set up a bool as in the “animate anything” tutorial.
but i would like to only have to click on the object.
here’s the state machine

i have set up a box collider on the object with this script.

using UnityEngine;
using System.Collections;

public class button_activator : MonoBehaviour {
	private Animator animator;

	void Awake () {
		animator = GetComponent <Animator>;
	}

	void OnMouseDown (Collider other){
		Animator.SetBool (pressed, true);
	}
	void OnMouseUp (Collider other){
		Animator.SetBool (pressed, false);
	}

}

but all my attempts get the thing not working
thanks

void OnMouseDown{
animator.SetBool (pressed, true);
}
void OnMouseUp {
animator.SetBool (pressed, false);
}

thanks all.
here’s the corrected working script

using UnityEngine;
using System.Collections;

public class button_activator : MonoBehaviour {

	private Animator jollyroger;
	
	void Awake () {
		jollyroger = GetComponent <Animator>(); 
	}
	
	void OnMouseDown() { 
		jollyroger.SetBool ("pressed", true);
	}
	void OnMouseUp() { 
		jollyroger.SetBool ("pressed", false);
	}
	
}