Help: Sliding GUI Elements

Well so here it is. I have created the GUI and I want to create a slide effect. For example, when the user click the Start Button, the GUI elements should slide over 1000 pixels to the left and reveal the level select menu. When the users click the Return button, the GUI elements should slide back to the right. I have created the GUI but am having trouble with the sliding part. Here is my script.

var customSkin : GUISkin;

function OnGUI ()
{
	GUI.skin = customSkin;
	///Main Menu
	if (GUI.Button (Rect (0,350,250,50), "Start Game"))
	{
		ShowLevels();
	}
	///LevelSelect Menu///
	GUI.BeginGroup(Rect(1125,125,750,500));
	GUI.Box(Rect(0,0,750,425),"");
	///Set One
	GUI.Box(Rect(25,25,200,200),"Snapshot Here");
	GUI.Label(Rect(50,250,150,75), "The level description goes here!");
	if (GUI.Button(Rect(25,350,200,50),">>Select<<"))
	{
		Application.LoadLevel(2);
	}
	///Set Two
	GUI.Box(Rect(275,25,200,200),"Snapshot Here");
	GUI.Label(Rect(300,250,150,75), "The level description goes here!");
	if (GUI.Button(Rect(275,350,200,50),">>Select<<"))
	{
		Application.LoadLevel(3);
	}
	///Set Three
	GUI.Box(Rect(525,25,200,200),"Snapshot Here");
	GUI.Label(Rect(550,250,150,75), "The level description goes here!");
	if (GUI.Button(Rect(525,350,200,50),">>Select<<"))
	{
		Application.LoadLevel(4);
	}
	///Bottom Buttons	
	if (GUI.Button(Rect(0,450,375,50),"<<Return To Main Menu<<"))
	{
		ShowMenu();
	}
	GUI.Box(Rect(375,450,375,50),"More Levels Coming Soon!");
	
	///End Group
	GUI.EndGroup();
}

/// moves GUI over to show level menu
function ShowLevels()
{
	
}

/// moves GUI back to main menu
function ShowMenu()
{

}

Notice that I have yet to define the ShowLevels and ShowMenu functions. That is my area of need. I have experimented with Tom Higgin’s template but it was not the result I wished for.

Thanks,
Geek377

i dont´really see where you try to animate the guy but it works like that.
The gui is always rendered on an update Phase. Think of a frame. Every frame the gui element is rendered according to the rect you define.
if that rect doesn´t change, there is no animation.

Thus, you need to define your rects first. In the onStart function perhaps. then you dont write:

if (GUI.Button (Rect (0,350,250,50), “Start Game”))
{
ShowLevels();
}

instead you write

if (GUI.Button (myRect, “Start Game”))
{
ShowLevels();
}

where myRect is the variable you defined to be a rectangle.

Now you can change that variable on a time or updatebasis and your elements will render according to that. For most flexibility check out iTween, which should even be able to tween rects. If not directly then with a tween value methode.