how to add material component to an Animate GUI script

Essentially I’m trying to create a cursor with two textures which it will alternate between using scripting but I can’t seem to add a texture component in the Animate GUI script in the inspector window. Any suggestions as to how to accomplish this?

(By the way I’m trying to follow this tutorial: http://www.design3.com/unity/game-builds/knights-3d-game/item/315-chapter-4-custom-cursor-image)

I think this may have to do with the script the tutorial is using that no longer works (specifically the Textured2D)?

(below is my animate GUI script so far)

var textures : Textures2D;

function Update () {
if (Input.GetButton(“Fire1”) ) {
guiTexture.texture = textures[1];
} else {
guiTexture.texture = texture [0];
}
}

@script RequireComponent(GUITexture)

you should write

var textures : Texture2d;

and not Textures2d. this is the problem. then use textures[n] where n is the index of the texture in the texture array.