Locking mouse event for a period of time

Since I am using iTween to handle so of the basic animations I am using the MoveAdd functionality that is given one parameter which refers to a set of similar game objects. During the animation time if you clicks the game object again it will handle the mouse event from its current position. Is there a way to disable mouse events for a set duration. I have tried waitForSeconds() although it didn’t work.

function OnMouseUp()
{
if(mouseDisabled == true)
return;
}

Not exactly what I was after

function OnMouseUp()
{
If(mouseDisabled == true)
return;

iTween();
mouseDisabled = true;
yield WaitForSeconds(animationTime);
mouseDisabled = false;
}

:.?

Where are you handling your input?

var mouseDisabledDelay : float = 0;
var mouseDisabled : boolean = false;


fucntion Update()
{
if(mouseDisabledDelay >0)
  mouseDisabledDelay -= Time.deltaTime;
else mouseDisabled = false;

if(!mouseDisabled  Input.GetMouseButton(0))
{
  //dostuff
  DisableMouse();
}

}

function DisableMouse()
{
 mouseDisabled = true;
 mouseDisabledDelay = 2;
}