package classes.gustavo.midia.teclado
{
	//
	import flash.display.Sprite;
	import flash.events.MouseEvent;
	import flash.text.TextField;
	
	public class Tecla extends Sprite
	{
		
		private var letra							:String;
		private var campo							:TextField;
		
		public var onSelect							:Function;
		
		public function Tecla() 
		{
			
			campo									= _campo;
			this.addEventListener(MouseEvent.CLICK, select);
			
		}
		
		public function setLetra(l:String):void
		{
			
			letra									= l;
			campo.text								= l;
			
		}
		
		public function select(e:MouseEvent):void
		{
			
			onSelect(letra);
			
		}
		
	}
	
}