package launcher.panel.buttonBar 
{
	import adobe.utils.CustomActions;
    import flash.display.MovieClip;
    import flash.text.TextField;
    import flash.text.TextFormat;
	import fonts.Fonts;
	import flash.events.MouseEvent;
	import flash.net.URLRequest;
	import flash.net.navigateToURL;
	import flash.geom.ColorTransform;
	import launcher.panel.buttonBar.icons.*;
	import launcher.panel.languagePanel

    public class quickPanel extends MovieClip 
    {
        public var home:icon_home = new icon_home();
		public var star:icon_star = new icon_star();
		public var comment:icon_comment = new icon_comment();
		public var money:icon_money = new icon_money();
		public var education:icon_education = new icon_education();
		
		
		public var homeURL:String = "https://home/";
		
		
		
        public var homeButton:MovieClip = new MovieClip();
		public var homeText:TextField = new TextField();
		public var hometextFormat:TextFormat = new TextFormat();
		public var textField:TextField = new TextField();

        public function quickPanel() 
        {
            Fonts.registerFonts();
            homeButton.addChild(home);
            homeButton.buttonMode = true;
			homeButton.addEventListener(MouseEvent.CLICK, onClickOnHome);
            homeButton.addEventListener(MouseEvent.MOUSE_OVER, onMouseOverHome);
            homeButton.addEventListener(MouseEvent.MOUSE_OUT, onMouseOutHome);
            homeButton.addEventListener(MouseEvent.MOUSE_DOWN, onHomeButtonDown);
            homeButton.addEventListener(MouseEvent.MOUSE_UP, onHomeButtonUp);
            addChild(homeButton);
            homeText.embedFonts = true;
            homeText.text = "Главная";
            homeText.width = 90; // установите ширину текстового поля
            homeText.height = 30; // установите высоту текстового поля
			homeText.x = 20;

           
           hometextFormat.font = "MyCustomFont";
		   hometextFormat.bold = true; // Делаем текст жирным
		   homeText.mouseEnabled = false;
           hometextFormat.size = 16; // установите размер текста
           hometextFormat.color = 0xFFFFFF; // установите цвет текста (белый)
           homeText.defaultTextFormat = hometextFormat;
           homeText.setTextFormat(hometextFormat);

           homeButton.addChild(homeText);
		   homeText.x = home.width + 5;
           homeText.y = home.height - 17;
		   
		   updateHeaderText();
		   
        }
		
		public function onClickOnHome(event:MouseEvent):void 
		{
            navigateToURL(new URLRequest(homeURL), "_blank");
            home.transform.colorTransform = new ColorTransform(0x00 / 0xFF, 0xa5 / 0xFF, 0xec / 0xFF);
            homeText.textColor = 0x00a5ec; 
        }
		
		////СЛУШАТЕЛИ КНОПКИ ДОМОЙ
        private function onMouseOverHome(event:MouseEvent):void
        {
            home.transform.colorTransform = new ColorTransform(0x75 / 0xFF, 0xD6 / 0xFF, 0xFF / 0xFF);
            homeText.textColor = 0x75d6ff; 
        }

        private function onMouseOutHome(event:MouseEvent):void
        {
            home.transform.colorTransform = new ColorTransform(); 
            homeText.textColor = 0xFFFFFF; 
        }

        private function onHomeButtonDown(event:MouseEvent):void
        {
            home.transform.colorTransform = new ColorTransform(0x00 / 0xFF, 0xa5 / 0xFF, 0xec / 0xFF); 
            homeText.textColor = 0x00a5ec; 
        }

        private function onHomeButtonUp(event:MouseEvent):void
        {
            home.transform.colorTransform = new ColorTransform(); 
            homeText.textColor = 0xFFFFFF; 
        }

		
    }
} как сделать смену текста,  при смене языка  package launcher.panel 
{
	/**
	 * ...
	 * @author alekskart
	 */
	import flash.display.MovieClip;
	import flash.text.TextField;
    import flash.text.TextFormat;
	import flash.events.MouseEvent;
	 
	public class languagePanel extends MovieClip 
	{
		public var ruButton:MovieClip = new MovieClip();
		public var enButton:MovieClip = new MovieClip();
		
		public var ruText:TextField = new TextField();
		public var rutextFormat:TextFormat = new TextFormat();
		//
		public  var enText:TextField = new TextField();
		public	var entextFormat:TextFormat = new TextFormat();
		//
		
		public function languagePanel() 
		{
			ruButton.buttonMode = true;
			ruButton.addEventListener(MouseEvent.CLICK, onClickOnRU);
            ruButton.addEventListener(MouseEvent.MOUSE_OVER, onMouseOverRU);
            ruButton.addEventListener(MouseEvent.MOUSE_OUT, onMouseOutRU);
            ruButton.addEventListener(MouseEvent.MOUSE_DOWN, onRUButtonDown);
            ruButton.addEventListener(MouseEvent.MOUSE_UP, onRUButtonUp);
            addChild(ruButton);
            ruText.embedFonts = true;
            ruText.text = "RU";
            ruText.width = 90; // установите ширину текстового поля
            ruText.height = 30; // установите высоту текстового поля
			ruText.x = 20;

           
           rutextFormat.font = "MyCustomFont";
		   rutextFormat.bold = true; // Делаем текст жирным
		   ruText.mouseEnabled = false;
           rutextFormat.size = 16; // установите размер текста
           rutextFormat.color = 0xFFFFFF; // установите цвет текста (белый)
           ruText.defaultTextFormat = rutextFormat;
           ruText.setTextFormat(rutextFormat);

           ruButton.addChild(ruText);
		   
		   
			enButton.buttonMode = true;
			enButton.addEventListener(MouseEvent.CLICK, onClickOnEN);
            enButton.addEventListener(MouseEvent.MOUSE_OVER, onMouseOverEN);
            enButton.addEventListener(MouseEvent.MOUSE_OUT, onMouseOutEN);
            enButton.addEventListener(MouseEvent.MOUSE_DOWN, onENButtonDown);
            enButton.addEventListener(MouseEvent.MOUSE_UP, onENButtonUp);
            addChild(enButton);
            enText.embedFonts = true;
            enText.text = "EN";
            enText.width = 90; // установите ширину текстового поля
            enText.height = 30; // установите высоту текстового поля
			enText.x = ruButton.x + ruButton.width;;

           
           entextFormat.font = "MyCustomFont";
		   entextFormat.bold = true; // Делаем текст жирным
		   enText.mouseEnabled = false;
           entextFormat.size = 16; // установите размер текста
           entextFormat.color = 0xFFFFFF; // установите цвет текста (белый)
           enText.defaultTextFormat = entextFormat;
           enText.setTextFormat(entextFormat);

           enButton.addChild(enText);
		}
		
		
		public function onClickOnRU(event:MouseEvent):void 
		{
            ruText.textColor = 0x00a5ec; 
        }
		
		public function onClickOnEN(event:MouseEvent):void 
		{
            enText.textColor = 0x00a5ec; 
        }
		
		////СЛУШАТЕЛИ КНОПКИ РУ
        private function onMouseOverRU(event:MouseEvent):void
        {
            ruText.textColor = 0x75d6ff; 
        }

        private function onMouseOutRU(event:MouseEvent):void
        {
            ruText.textColor = 0xFFFFFF; 
        }

        private function onRUButtonDown(event:MouseEvent):void
        {
            ruText.textColor = 0x00a5ec; 
        }

        private function onRUButtonUp(event:MouseEvent):void
        {
            ruText.textColor = 0xFFFFFF; 
        }
        ///////////
		
		
		////СЛУШАТЕЛИ КНОПКИ EN
        private function onMouseOverEN(event:MouseEvent):void
        {
            enText.textColor = 0x75d6ff; 
        }

        private function onMouseOutEN(event:MouseEvent):void
        {
            enText.textColor = 0xFFFFFF; 
        }

        private function onENButtonDown(event:MouseEvent):void
        {
            enText.textColor = 0x00a5ec; 
        }

        private function onENButtonUp(event:MouseEvent):void
        {
            enText.textColor = 0xFFFFFF; 
        }
        ///////////
		
	}

}