RollOver issue within a hierarchy

Hi, I am ttrying to create a RollOver script to go with my Interface that I can apply to the top most hiearchy (ie menu>elements) then call the elements I want [ie so I dont have to place button scripts on every element just to have rollovers.

I am pretty new to the scripting part but I managed to create a rollover that works somewhat. However, I am trying to call some gameObjects in the scene and then enable disable them depending on the rollover. Hoever I keep getting erros that UNITY cannot find my the variables “enabled”. Here is the code I have:

 var normalTexture;
 var hoverTexture : GUITexture;
 var pressedTexture : GUITexture;
 var messagee : GameObject;
 var message = "ButtonPressed";
 
var menuBkg; 

 
 
 private var state = 0;
 private var myGUITexture : GUITexture;
 
 
 //menuBkg = GameObject.find("menuBkg");
 
 //myGUITexture = GameObject.find("APUprogr0");

function Start() {
	menuBkg = GameObject.Find("menuBkg");
	normalTexture = GameObject.Find("menuBkg/APUcmplte1");
}



 
var highlightColor = Color.yellow;
	
function OnMouseEnter () {
	hoverTexture.color.a = 0;
	normalTexture.enabled = false;
	Debug.Log("hi"+ menuBkg);
}

function OnMouseExit () {
	hoverTexture.color.a = 100;
}

The problem arises when the normalTexture element is called…take it out its ok. This script is place at the topmost chain and looks for elements within that hierarchy.

I appreciate any help and tahnks in advance.

You haven’t declared normalTexture to be of type GUITexture, like you have for the others.

Since GameObject.Find by default returns the GameObject itself, and not the GuiTexture component, the normalTexture points to a GameObject, which does not have an “enabled” member.