slider to control shader opacity

I want to use the Unity Compound control example at the top here: file:///Applications/Unity/Unity.app/Contents/Documentation/Documentation/Components/gui-Extending.html (Which needs a curly bracket in it by the way) to control the opacity of a shader. Can anyone point me in the right direction? Thanks.

It's pretty easy:

float AlphaValue = 1;

void OnGUI()
{
     AlphaValue = GUI.HorizontalScrollbar(new Rect(0, 0, 100, 20), AlphaValue, 1, 0, 1, "MyScrollbar");
}

void Update()
{
     Color c = renderer.material.color;
     renderer.material.color = new Color(c.r, c.g, c.b, AlphaValue);
}

I realize this sets the color of the shader every frame, so it's not completely efficient, but I figure I'll leave the optimization up to you. :P