main menu animation

what i want to happen is when you click the play button, an animation will play and when its done the frist level will load. if you could script that in java script that would be great!

See: http://unity3d.com/support/documentation/ScriptReference/MonoBehaviour.OnGUI.html

It might look something like this (untested)

function OnGUI () {
    if (GUI.Button (Rect (10,10,150,100), "olay"))
    {
        GameObject.Find("myanim").GetComponent(Animation).Play();
        yield WaitForSeconds (5); // wait til animation done (probably not a good idea)
        Application.LoadLevel("myNextLevel");
    }
}

You might need to use a coroutine to do the animation and load next level. You might want the animation to have an event that fires to tell you it's done so you know when to load the next level.