package launcher.button 
{
	/**
	 * ...
	 * @author alekskart
	 */
	import launcher.button.*;
	import flash.display.MovieClip;
	import flash.events.MouseEvent;
	 
	public class FightButton extends MovieClip 
	{
		public var fightbuttonActiveENI:fight_button_active_en = new fight_button_active_en();
        public var fightbuttonActiveRUI:fight_button_active_ru = new fight_button_active_ru();
        public var fightbuttonENI:fight_button_en = new fight_button_en();
        public var fightbuttonHoverENI:fight_button_hover_en = new fight_button_hover_en();
        public var fightbuttonHoverRUI:fight_button_hover_ru = new fight_button_hover_ru();
		public var fightbuttonRUI:fight_button_ru = new fight_button_ru();
		
		
        public var fightbuttonActiveEN:MovieClip = new MovieClip();
		public var fightbuttonActiveRU:MovieClip = new MovieClip();
		public var fightbuttonEN:MovieClip = new MovieClip();
		public var fightbuttonHoverEN:MovieClip = new MovieClip();
		public var fightbuttonHoverRU:MovieClip = new MovieClip();
		public var fightbuttonRU:MovieClip = new MovieClip();
		
		public function FightButton() 
		{
			
			fightbuttonRU.alpha = 0.7; 
			fightbuttonRU.addChild(fightbuttonRUI);
			fightbuttonRU.buttonMode = true;
			fightbuttonRU.addEventListener(MouseEvent.MOUSE_OVER, onClickOnFightRU);
            fightbuttonRU.addEventListener(MouseEvent.MOUSE_OVER, onMouseOverFightRU);
            fightbuttonRU.addEventListener(MouseEvent.MOUSE_OUT, onMouseOutFightRU);
            fightbuttonRU.addEventListener(MouseEvent.MOUSE_DOWN, onFightButtonDownRU);
            fightbuttonRU.addEventListener(MouseEvent.MOUSE_UP, onFightButtonUpRU);
			addChild(fightbuttonRU);
			
		    fightbuttonEN.alpha = 0.7; 
			fightbuttonEN.addChild(fightbuttonENI);
			addChild(fightbuttonEN);
			fightbuttonEN.visible = false;
		}
		
		
		
		public function onClickOnFightRU(event:MouseEvent):void 
		{
        }
		
		////СЛУШАТЕЛИ КНОПКИ РУ
		
		// принавиедении
        private function onMouseOverFightRU(event:MouseEvent):void
        {
            fightbuttonRU.removeChild(fightbuttonRUI);
            fightbuttonRU.addChild(fightbuttonHoverRUI);
        }

        private function onMouseOutFightRU(event:MouseEvent):void
        {

			fightbuttonRU.removeChild(fightbuttonHoverRUI);
            fightbuttonRU.addChild(fightbuttonRUI);
        }
		///////

		
		///ПРИНАЖАТИИ
        private function onFightButtonDownRU(event:MouseEvent):void
        {
            fightbuttonRU.addChild(fightbuttonActiveRUI);
            fightbuttonRU.removeChild(fightbuttonHoverRUI);
        }

        private function onFightButtonUpRU(event:MouseEvent):void
        {

fightbuttonRU.removeChild(fightbuttonActiveRUI);
fightbuttonRU.addChild(fightbuttonRUI);
        }
        ///////////
		
        public function updateButton(language:String):void 
		{
            if (language == "RU") 
			{
                fightbuttonEN.visible = false;
				fightbuttonRU.visible = true;
            } 
		    else if (language == "EN") 
		    {
                fightbuttonEN.visible = true;
				fightbuttonRU.visible = false;
            }
        }
		
	}

} при нажатии и удержание, после отвода курсора и отпуска мыши, кнопка остается с текстурой fightbuttonActiveRU, но она должна вернуться к состоянию fightbuttonRU