Change Object Color Using Tags OnMouseOver

I am attempting to change my object’s Color when Mouse Moves over it, then go back to Default.

So far I have Material “Default”, Material “Enemy”, and the GameObject “cube” just to sample the code.

Code I’ve previously attempted:

//

var mat : Enemy;

function OnMouseOver()

{

if (Tag = GameObject.FindGameObjectWithTag("Enemy")
    {
        renderer.material = mat;
    }

}

Found the answer:

//linked created Material to variable in script
var defaultMat : Material;
//linked created Material to variable in script
var enemyMat : Material;

//What happens when the mouse moves over object with script attached.
function OnMouseOver ()
{
	if (gameObject.CompareTag("Enemy"))
	{
		gameObject.GetComponent.<Renderer>().material = enemyMat;
	}
}

//What happens when mouse moves off of object with script attached.
function OnMouseExit ()
{
	gameObject.GetComponent.<Renderer>().material = defaultMat;
}