package 
{
	import flash.display.Sprite;
	
	public class Menu extends Sprite 
	{
		private var start : Button = new Button("Play", Start, 130, 2);
		private var submit : Button = new Button("Submit", Submit, 250, 1);
		
		public function Menu():void {
			addChild(start);
			addChild(submit);
		}
		
		private function Start():void {
			visible = false;
			Global.game_started = true;
		}
		
		private function Submit():void {
			import mochi.as3.*;
			var o:Object = { n: [7, 3, 1, 12, 6, 8, 13, 10, 5, 7, 2, 15, 9, 13, 0, 13], f: function (i:Number,s:String):String { if (s.length == 16) return s; return this.f(i+1,s + this.n[i].toString(16));}};
			var boardID:String = o.f(0,"");
			MochiScores.showLeaderboard({boardID: boardID, score: Player.player.parts_max - 10});
		}
		
		public function Update():void {
			start.Update();
			submit.Update();
		}
	}
	
}