How do I make a Main menu screen using an image (asset) and box colliders?

Hi I am making a 2D game using C#. I have art for the main menu screen with two buttons, “Start” and “Quit”. I put box colliders around the two buttons. I need to make a code to make the buttons functional. So when you click on the Start button it will load the first level and when you click on Quit, it will quit the game. I know this is simple and i’ve found millions of tutorials on how to create a main menu using GUI’s but I can’t find anything on using an image and box colliders. Thank you.

Here’s what I would do (JS):
I create a single script called MouseHoverOverButton:

var ButtonHoverVar : GameObject;

function OnMouseEnter ()
	{
	ButtonHoverVar.transform.localPosition.y = 1.0;
	}

function OnMouseExit ()
	{
	ButtonHoverVar.transform.localPosition.y = 0.0;
	}

For each button you would have an Empty GameObject. For example for the New Game button an empty gameObject called NewGameButton. You attach the script above to the button objects and add the correct variable (NewGameButton, in this case) to each script. Now you know which button the mouse is over.
Then in your GeneralMenuControl script you can do the rest:

private var NewGameButton : GameObject;

function Start ()
	{
	NewGameButton = GameObject.Find("/Variables/NewGameButton");
	}

function Update ()
	{
	if (NewGameButton.transform.localPosition.y > 0.5 && Input.GetMouseButtonDown(0))
		{
		Application.LoadLevel("New Game");
		}
	//and do the same for the ther buttons
	else if()
		{
		//Do something else...
		}
	else if()
		{
		//do something else...
		}
	}

just to keep things tidy, I keep all my empty GameObjects as children of another empty GameObject called Variables. That way I know where all my GameObject variables are.

Alternatively, if you’re using Colliders and Rays, when you get a hit, you can use:

function Update ()
	{
	var hit = RaycastHit;
	var ray: Ray = camera.ScreenPointToRay(Input.mousePosition);
	if (Physics.Raycast(ray, hit))
		{
		if (hit.Name == "New Game" && Input.GetMouseButtonDown(0))
			{
			Application.LoadLevel("New Game");
			}
		else if (hit.Name == "Options" && Input.GetMouseButtonDown(0))
			{
			//open the options nemu
			}
		else if(....
		}
	}

And you can continue to use hit.name and do the operations needed for each different name that is returned.

And for quit use:

Application.Quit();