2 Replies Latest reply on Feb 26, 2012 5:31 AM by sergnew10082000

    connections is not always established

    sergnew10082000

      I m trying on my site flash player comunication. Connection synhronization is on my site.

      Connection between some IP s is established well and continue to the end of call. But between another IP s is not established at all.

      What it may be ?

       

      My site   TURDOS.RU (travel by byke or on foot) russian Moscow

       

      May be for some GURU in ActionScript all the code

       

      <?xml version="1.0" encoding="utf-8"?>
      <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark"
            xmlns:mx="library://ns.adobe.com/flex/mx"
            width="624" height="532" minWidth="500" minHeight="500"
            viewSourceURL="srcview/index.html"
            creationComplete="p2p_1()">
      <fx:Declarations>
        <!-- Разместить невизуальные элементы (например, службы или объекты значений) -->
      </fx:Declarations>
      <fx:Script>
        <![CDATA[
        
         import mx.events.ListEvent;
         import mx.collections.ArrayCollection;
        
         private const CirrusAddress:String = "rtmfp://p2p.rtmfp.net";
         private const DeveloperKey:String = "a56230a18105f402da76990e-69964df27226";
         private var nc:NetConnection;
         private var myPeerID:String ;
         private var farPeerID:String = "";
        
         private var sendStream:NetStream;
         private var recvStream:NetStream;
        
         private var cam:Camera;
         private var mic:Microphone;
        
         private var loader:URLLoader;
         private var loader1:URLLoader;
         private var loader2:URLLoader;
         private var loader3:URLLoader;
        
         private var my_id:String;
         private var num:String;
         private var user1:String;
         private var adobeChatID:String;
         private var iam:String;
         private var adobeChatIDslave:String;
         private var tMaster:Timer;
         private var tSlave:Timer;
         private var tMaster1:Timer;
         private var tMasterLast:Timer;
         private var tRec:Timer;
        
         private var str10:String;
         private var request:URLRequest;
         private var request1:URLRequest;
         private var request2:URLRequest;
         private var request3:URLRequest;
        
         //private var path:String="http://localhost:1961/tur/";
         private var path:String="";
        
         private var timer_ind:int = 0;
         private var timer_ind1:int = 0;
         private var ok:int = 0;
        
         private var once:int = 0;
         private var once1:int = 0;
        
         private var camS:Camera;
         private var micS:Microphone;
        
         private var timerSeconds:int;
         private var timerSeconds1:int;
        
         private var file:FileReference; 
         private var fileSendStream:NetStream;
         // A Dataprovider for the listitem (to display downloads) 
                  private var dp:ArrayCollection = new ArrayCollection;
         private var fileRecievedStream:NetStream;
        
        
        
        
         public  function p2p_1():void{
         
        
         
          cam = Camera.getCamera();
          if(cam) {
           cam.setMode(280,240,15,true);
           var vid:Video = new Video(cam.width, cam.height);
           vid.x = 0;
           vid.y = 0;
           vid.attachCamera(cam);
           video1.width = cam.width;
           video1.height = cam.height;
           video1.addChild(vid);
          }
          else{
           //wcam.visible = true;
          
          }
          mic = Microphone.getMicrophone();
          if(mic){
           //mic.setLoopBack(true);
           //mic.setUseEchoSuppression(true);
          }
          else{
           //wmic.visible = true;
          }
         
          if(cam!=null || mic!=null){
           Security.showSettings();
          }
         
         
         
         
          error1.visible = false;
          nc = new NetConnection();
          nc.addEventListener(NetStatusEvent.NET_STATUS, ncHandler);
          nc.connect(CirrusAddress, DeveloperKey);
          //begin.enabled = false; 
          info1.visible = true;
         
          fileList.visible = false;
                   fileList.addEventListener(ListEvent.ITEM_CLICK, itemDownloadHandler); 
          fl1.visible = false;
          fl2.visible = false;
          frec.visible = false;
          frec1.visible = false;
          close1.visible = false;
         
          load1.visible = false;
          fileSizeError.visible = false;

         
         
         }
        
         private function ncHandler(event:NetStatusEvent):void {
          var myQueryStrings:Object=this.loaderInfo.parameters;
          my_id=myQueryStrings.id;
          num=myQueryStrings.num;
          user1=myQueryStrings.user1;
          iam=myQueryStrings.iam;
         
          info1.visible = false;
         
         
          if(event.info.code=='NetConnection.Connect.Closed')
          {
           close1.visible = true;
          }
         
          if(event.info.code!="NetConnection.Connect.Failed")
          {
          
           if(iam=="slave"){
            if(once1 == 0){
             once1 = 1;//so that if some crazy thing think to call this stuff twice
            
             tSlave = new Timer(5000,0);
             myPeerID = nc.nearID;
             farPeerID = myQueryStrings.VideoChatID;
             labelBeginSlave.visible = true;      
             str10 = path + "VideoChatConnection.aspx?id="+my_id+"&num="+num+"&user1="+ user1  + "&iam=slave" + "&Init=no";
             request = new URLRequest(str10);
             loader = new URLLoader();
             try {loader.load(request); }
             catch (error:SecurityError) {trace("A SecurityError has occurred.");}
             loader.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
             loader.addEventListener(Event.COMPLETE, function (event:Event):void
             {
              try {
               trace(loader.data);
              
               tSlave.addEventListener(TimerEvent.TIMER,function (event:Event):void
               {
                tSlave.stop();
                str10 = path + "VideoChatConnection.aspx?id="+my_id+"&num="+num+"&user1="+ user1  + "&iam=slave" + "&Init=get";
                request = new URLRequest(str10);
                loader = new URLLoader();
               
                try {
                 loader.load(request);
                }
                catch (error:SecurityError)
                {
                 trace("A SecurityError has occurred.");
                }
                loader.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
                loader.addEventListener(Event.COMPLETE, function (event:Event):void
                {
                 try {
                  trace(loader.data);
                 
                  if(loader.data=="init"){
                   timer_ind = 1; //that s the end of all timers
                   //master indicated initialization
                   tSlave.stop();
                   labelBeginSlave.text = "  Ответ получен.";
                   labelEndSlave.visible = true;
                   initRecvStream();
                   initSendStream();
                  
                   str10 = path + "VideoChatConnection.aspx?id="+my_id+"&num="+num+"&user1="+ user1  + "&iam=slave" + "&Init=putEnd";
                   request1 = new URLRequest(str10);
                   loader1 = new URLLoader();
                  
                   try {
                    loader1.load(request1);
                   }
                   catch (error:SecurityError)
                   {
                    trace("A SecurityError has occurred.");
                   }
                   loader1.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
                   loader1.addEventListener(Event.COMPLETE, function (event:Event):void
                   {
                    send.enabled = true;
                    labelBeginSlave.visible = false;
                    labelEndSlave.visible = false;
                   
                   });
                  
                  }
                 
                 }
                 catch (e:TypeError) {
                  trace("Could not parse the XML file.");
                 }
                });
                if(timer_ind!=1)
                 tSlave.start();
               });
               if(timer_ind!=1)
                tSlave.start();
              } catch (e:TypeError) {
               trace("Could not parse the XML file.");
              }
             });
            }
           }
            //master______________________________________________________________________
            //_____________________________________________________________________________
            //_____________________________________________________________________________
           else{
            if(once==0){
             //that will be called twice because of when stream come from slave and so var ONCE indicate that
             once = 1;
            
             tMaster = new Timer(5000,0);
             tMaster1 = new Timer(5000,0);
             tMasterLast = new Timer(200,0);
             timerSeconds = 0;
             timerSeconds1 = 0;
            
             myPeerID = nc.nearID;
             adobeChatID = nc.nearID;
             //call slave
             labelBeginMaster.visible = true;
             str10 = path + "VideoChatConnection.aspx?id="+my_id+"&num="+num+"&user1="+ user1 + "&adobeChatID=" + adobeChatID +
              "&masterInit=begin";
             request = new URLRequest(str10);
             loader = new URLLoader();
             try {loader.load(request);}
             catch (error:SecurityError) {trace("A SecurityError has occurred.");}
             loader.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
            
            
             labelSec.visible = true;
             labelSec.text = "время(сек):  " + timerSeconds.toString();
            
             loader.addEventListener(Event.COMPLETE, function(event:Event):void
             {
                  try {
               tMaster.addEventListener(TimerEvent.TIMER,function (event:Event):void
               {
                timerSeconds += 5;
                labelSec.text = "время(сек):  " + timerSeconds.toString();
               
                tMaster.stop();
               
                str10 = path + "VideoChatConnection.aspx?id="+my_id+"&num="+num+"&user1="+ user1 + "&adobeChatID=" + adobeChatID +
                "&masterInit=get";
                request = new URLRequest(str10);
                loader = new URLLoader();
               
                try {
                 loader.load(request);
                }
                catch (error:SecurityError)
                {
                 trace("A SecurityError has occurred.");
                }
                loader.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
                loader.addEventListener(Event.COMPLETE, function (event:Event):void
                {
                 try {
                  if(loader.data=="Ok"){
                   timer_ind = 1; //that s the end of all timers
                   //slave indicated that it is ready so master has to init
                   tMaster.stop();
                   labelBeginMaster.text = "   Ответ получен.";
                   labelInitSendMaster.visible = true;
                   initSendStream();
                   labelInitSendMaster.text = " Поток передачи иницилизирован.";
                  
                   str10 = path + "VideoChatConnection.aspx?id="+my_id+"&num="+num+"&user1="+ user1 + "&adobeChatID=" + adobeChatID +
                   "&masterInit=init";
                   request = new URLRequest(str10);
                   loader = new URLLoader();
                  
                   try {
                    loader.load(request);
                   }
                   catch (error:SecurityError)
                   {
                    trace("A SecurityError has occurred.");
                   }
                   loader.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
                   loader.addEventListener(Event.COMPLETE, function (event:Event):void
                   {
                    trace(loader.data);
                    labelInitRecvMaster.visible = true;
                    //that s the end of game
                    tMaster1.addEventListener(TimerEvent.TIMER,function (event:Event):void
                    {
                     tMaster1.stop();
                    
                     timerSeconds += 5;
                     labelSec.text = "время(сек):  " + timerSeconds.toString();
                    
                     str10 = path + "VideoChatConnection.aspx?id="+my_id+"&num="+num+"&user1="+ user1 + "&adobeChatID=" + adobeChatID +
                     "&masterInit=getEnd";
                     request2 = new URLRequest(str10);
                     loader2 = new URLLoader();
                     try {loader2.load(request2);}
                     catch (error:SecurityError) {trace("A SecurityError has occurred.");}
                     loader2.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
                     loader2.addEventListener(Event.COMPLETE, function (event:Event):void
                     {
                      if(loader2.data=="End"){
                       timer_ind1 = 1;
                      
                       //may be error
                       //make here delay
                       tMasterLast.addEventListener(TimerEvent.TIMER,function (event:Event):void
                       {
                        timerSeconds1 += 200;
                        labelRecfarpeerID.text = timerSeconds1.toString() + " farPeerID равно " + farPeerID;
                         
                          if(farPeerID!="")
                          {
                          tMasterLast.stop();
                          initRecvStream();
                          labelInitRecvMaster.text = " Поток приёма инициализирован.";
                          labelBeginMaster.visible = false;
                          labelInitSendMaster.visible = false;
                          labelInitRecvMaster.visible = false;
                          labelRecfarpeerID.visible = false;
                          labelSec.visible = false;
                          send.enabled = true;
                          tMaster1.stop();
                      
                          str10 = path + "VideoChatConnection.aspx?id="+my_id+"&num="+num+"&user1="+ user1 + "&adobeChatID=" + adobeChatID +
                                 "&masterInit=delFile";
                             request3 = new URLRequest(str10);
                          loader3 = new URLLoader();
                          try {loader3.load(request3);}
                          catch (error:SecurityError) {trace("A SecurityError has occurred.");}
                          loader3.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
                          loader3.addEventListener(Event.COMPLETE, function (event:Event):void
                          {});
                          }
                      
                         
                       });
                      
                       labelRecfarpeerID.visible = true;
                       labelRecfarpeerID.text = "farPeerID равно " + farPeerID;
                       tMaster.stop();
                       tMaster1.stop();
                       tMasterLast.start();
                      
                      }
                     
                     });
                     if(timer_ind1==0)
                      tMaster1.start();
                    
                    });
                    if(timer_ind1==0)
                     tMaster1.start();         
                   
                   
                   });
                  
                  
                  }
                 }
                 catch (e:TypeError) {
                  trace("Could not parse the XML file.");
                 }
                
                });
                if(timer_ind!=1)
                 tMaster.start();
               
               });
               if(timer_ind!=1)
                tMaster.start();
              } catch (e:TypeError) {
               trace("Could not parse the XML file.");
              }
             });
             //___________________________________________________________
            }
           }
          }
          else{error1.visible = true;
           //begin.enabled = true;
          }
         }
        
         private function initSendStream(): void{
          sendStream = new NetStream(nc, NetStream.DIRECT_CONNECTIONS);
         
         
          sendStream.bufferTime = 0;//minimum delay
         
         
          sendStream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
          sendStream.publish("media");
         
          //send video and audio if any   
          camS = Camera.getCamera();
          if(camS) {
           camS.setMode(280,240,15,true);
           sendStream.attachCamera(camS);
          }
          micS = Microphone.getMicrophone();
          if(micS){
           micS.setUseEchoSuppression(true);
           sendStream.attachAudio(micS);
          }
          /*sendStream.attachAudio(Microphone.getMicrophone());
          cam = Camera.getCamera();
          cam.setMode(560,480,24,true);
          sendStream.attachCamera(cam);*/
         
         
          var sendStreamClient:Object = new Object();
          sendStreamClient.onPeerConnect = function(callerns:NetStream):Boolean {
           farPeerID = callerns.farID;
           trace("OnPeerConnect" + farPeerID);
           return true;
          }
         
          sendStream.client = sendStreamClient;
         
         
          //init send stream for file exchange
          //so be that in any case that user will want to send file
          fileSendStream = new NetStream(nc, NetStream.DIRECT_CONNECTIONS); 
          fileSendStream.addEventListener(NetStatusEvent.NET_STATUS, netStreamHandler); 
          // Giving the stream a idName 
          fileSendStream.bufferTime = 0;//minimum delay
          fileSendStream.publish("file"); 
         
         }
         private function initRecvStream(): void{
         
          tRec = new Timer(5000,0);//5 sec delay before to begin receive
          tRec.start();
          tRec.addEventListener(TimerEvent.TIMER,function (event:Event):void
          {
           tRec.stop();
        
              recvStream = new NetStream(nc, farPeerID);
         
              recvStream.bufferTime = 0;//minimum delay
         
              recvStream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
              recvStream.play("media");
         
              recvStream.client = this;
         
             //receive video and audio if any
             var vid:Video = new Video(280, 240);
             vid.x = 0;
             vid.y = 0;
             vid.attachNetStream(recvStream);
             video0.addChild(vid);
         
            //init receive stream for file exchange
            //so be that in any case that user will want to receive file
            // This functions handles the incomming data 
                        fileRecievedStream = new  NetStream(nc,farPeerID); 
                        fileRecievedStream.client = this; 
                        fileRecievedStream.addEventListener(NetStatusEvent.NET_STATUS, incomingStreamHandler); 
                     // Using the "file" stream identification 
               fileRecievedStream.bufferTime = 0;//minimum delay
            fileRecievedStream.play("file"); 
          });
         
         }
        
         public function incomingStreamHandler(e:NetStatusEvent):void
                  { 
                       // If there was a connection between you and the  target 
                     if(e.info.code == "NetStream.Play.Start") 
                     { 
                        // set the textBackgroundcolor to green 
                        // connectLabel.text = "Your Are connected"; 
                         // show the fileBrowse/Send view 
                          //fileField.visible = true; 
            
                      } 
                  } 
        

        
         private function sendSomeData(): void{
          var date:Date = new Date();
          var x:String = "\r\n_____ " + date.getHours().toString() + ":" + date.getMinutes().toString() + " _____";
         
          txtRecvdData.text += x + "\r\n" + txtSendData.text + "\r\n" + "______________________________";
          sendStream.send("receiveSomeData", txtSendData.text);
          txtSendData.text = "";
          txtRecvdData.scrollToRange(int.MAX_VALUE);
         }
         public function receiveSomeData(str:String): void{
          if(str=="***!!!***send")
          {
           frec1.visible = true;//your peer sending you a file
          }
          else if (str=="***!!!***re"){
           frec.visible = false;//file is received
          }
          else
          {
          txtRecvdData.scrollToRange(int.MAX_VALUE);
          var date:Date = new Date();
          var x:String = "\r\n_____ " + date.getHours().toString() + ":" + date.getMinutes().toString() + " _____";
         
          txtRecvdData.text += x + "\r\n" + str + "\r\n" + "______________________________";
          txtRecvdData.scrollToRange(int.MAX_VALUE);
         
          //beep when message is received
          var myRequest10:URLRequest;
          var mySound10:Sound;
          myRequest10 = new URLRequest("click.mp3");
          mySound10 = new Sound();
          mySound10.load(myRequest10);
          mySound10.play();
          }
         
         
         }
         private function netStatusHandler(event:NetStatusEvent):void {
          trace(event.info.code);
         }
         private function errorHandler(e:IOErrorEvent):void {
          trace("Had problem loading the  File.");
         }
        
        
        
         private function browseHandler():void
                           { 
                          fileSizeError.visible = false;
                        // Creating a new FileReference to start choosing 
                           file = new FileReference; 
                           // Adding eventListeners 
                           file.addEventListener(Event.SELECT, selectHandler); 
                           file.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler); 
                                file.addEventListener(ProgressEvent.PROGRESS, progressHandler); 
                                file.addEventListener(Event.COMPLETE, completeHandler); 
                          // Open the browse-file dialogue 
                                 file.browse(); 
                               } 
        
         private function selectHandler(event:Event):void
                               { 
                               // If you selected a file to send 
                                      file =  FileReference(event.target); 
                               // load the file 
                                      file.load(); 
                              // Set the source textfield to the filename 
                             
              load1.visible = true;
             
                               } 
         private function completeHandler(event:Event):void
                               { 
                   //file lenght must be less than 14 000 000 byte
                   if(file.data.length < 14000000)
             {
                   // The file was loaded succesfully 
                               //trace("completeHandler: " + event); 
                               // The send button will be enabled
             fileName.text = file.name;
                               btnSend.enabled= true;
            
             load1.visible = false;
             }
             else{
              fileSizeError.visible = true;
             }
                            } 
         private function ioErrorHandler(event:IOErrorEvent):void
                               { 
                                //trace("ioErrorHandler: " + event); 
                               } 
         private function progressHandler(event:ProgressEvent):void
                   { 
                      // Process  loading the file 
                       var file:FileReference =  FileReference(event.target); 
                       //trace("progressHandler: name=" + file.name + "129 bytesLoaded=" + event.bytesLoaded + " bytesTotal=" + event.bytesTotal); 
                       //connectLabel.text = "progressHandler: name=" + file.name + " bytesLoaded=" + event.bytesLoaded + " bytesTotal=" + event.bytesTotal; 
                       load1.text = "Загрузка :  " + event.bytesTotal + " байт";  
         } 
        
         public function onFileSend(e:Event):void
                 { 
        
                       // Creating an object 
                      var fileData:Object = new Object(); 
                      // Giving the object a property that container the  file data as a ByteArray 
                     fileData.file = file.data 
                       // Property of the name of the file 
                     fileData.name = file.name; 
                       // Sending the file to the target and it will be   received 
                       // by the 'onFileReceived' function 
             fileSendStream.send("onFileReceived",fileData);
            //fileSendStream.send("onFileReceived",file.data); 
           btnSend.enabled= false;
           sendStream.send("receiveSomeData", "***!!!***send");//indicate sending file
           frec.visible = true;
          
                  } 
        
        
         public function netStreamHandler(e:NetStatusEvent):void
                  { 
                      trace(e.info.code);
          
                  }
        
         public function onFileReceived(info:Object):void
         //public function onFileReceived(ar:ByteArray):void
                   {
          frec1.visible = false;//your peer completes sending you a file
         
                     // This functions handles the incomming data 
                       // We add the object to a dataprovider 
                      // For displayin the files in a list 
                      // Giving the name and file data as properties 
           dp.addItem({label:info.name, file:info.file}); 
                     // If an item of the list was clicked 
                      // Setting the dataprovider of the listcomponent 
           fileList.dataProvider = dp;
           fileList.visible = true;
           fl1.visible = true;
           fl2.visible = true;
                   } 
                   private function itemDownloadHandler(event:ListEvent):void
                   { 
                      // creating new FileReference 
                      file= new FileReference(); 
                      // saving the clicked item to your computer 
                      // brings out a savedialogue 
                      file.save(event.itemRenderer.data.file, event.itemRenderer.data.label);
          dp.removeAll();
          fileList.visible = false;
          fl1.visible = false;
          fl2.visible = false;
         
         
          file.addEventListener(Event.COMPLETE, completeHandler1); 
          file.addEventListener(Event.CANCEL, cancelHandler1);
          frec.visible = true;
         
                   }

         private function completeHandler1(event:Event):void
         { 
          // The file was loaded succesfully 
          //trace("completeHandler: " + event); 
          // The send button will be enabled
          sendStream.send("receiveSomeData", "***!!!***re");
          frec.visible = false;
         } 
         private function cancelHandler1(event:Event):void
         { 
          sendStream.send("receiveSomeData", "***!!!***re");
          frec.visible = false;
         } 

       


        
        ]]>
      </fx:Script>

       

       

       

      <mx:Application width="628" height="1500" horizontalAlign="left" layout="absolute"  >
       
        <s:Panel x="3" y="3" width="280" height="500" backgroundColor="#040000" chromeColor="#070000">
        </s:Panel>
        <s:VideoDisplay id="video1" x="3" y="253" width="280" height="240" chromeColor="#FFFFFF"/>
        <s:VideoDisplay id="video0" x="3" y="8" width="280" height="240" chromeColor="#FFFFFF"/>
        <s:TextArea x="293" y="424" width="323" height="48" id="txtSendData"/>
       
       
        <s:Button id="send" x="465" y="480" label="Отправить сообщение" click="sendSomeData()" enabled="false"/>
        <s:Label x="294" y="405" width="328" height="12" text="Если микрофон не работает,напишите текст.сообщение"/>
        <s:Label id="labelBeginMaster" visible="false" x="38" y="89" width="161" color="#F61010"
           fontSize="16" text="               Звоним ......."/>
        <s:Label id="labelInitSendMaster" visible="false" x="29" y="110" width="263" color="#F50E0E"
           fontSize="16" text="Иницилизация потока передачи...."/>
        <s:Label id="labelInitRecvMaster" visible="false" x="30" y="132" width="242" color="#F50E0E"
           fontSize="16" text="Иницилизация потока приёма...."/>
       
        <s:Label id="labelBeginSlave" visible="false" x="36" y="95" width="201" color="#F61010"
           fontSize="16" text="         Ожидание ответа ......."/>
        <s:Label id="labelEndSlave" visible="false" x="23" y="115" width="261" color="#F50E0E"
           fontSize="16" text="Иницилизация потока передачи...."/>
        <s:Label id="labelRecfarpeerID" visible="false" x="23" y="145" width="261" color="#F50E0E"
           fontSize="16" text="  Получение farePeerID...."/>
       
        <s:TextArea id="txtRecvdData" x="294" y="11" width="323" height="342" color="#8B8080"
           editable="false" verticalAlign="middle"/>
        <s:Label id="frec" x="335" y="163" width="253" height="44" color="#F00E0E" fontSize="24"
           fontStyle="italic" fontWeight="normal" text="Передача файла....."/>
       
        <s:Label id="frec1" x="335" y="188" width="306" height="44" color="#F00E0E" fontSize="24"
           fontStyle="italic" fontWeight="normal" text="Вам передают файл....."/>
       
        <s:Label id="close1" x="110" y="180" width="443" height="44" color="#F00E0E" fontSize="29"
           fontStyle="italic" fontWeight="bold" text="СОЕДИНЕНИЕ РАЗОРВАНО !"/>
       
       
        <s:Label  id="error1" visible="false" x="53" y="160" width="522" height="28" color="#F80B0B" fontSize="20" text="Нет связи с интернетом или Adobe сервер не отвечает"/>
        <s:Label  id="info1" visible="false" x="80" y="116" width="126" height="28" color="#F80B0B" fontSize="20" text="Ожидание...."/>
        <s:Label visible="false" id="qqq" x="75" y="176" width="140" height="24" text="Метка"/>
       
       
        <s:Label id="wcam" visible="false" x="69" y="335" width="180" height="29" color="#F50C0C" fontSize="21" text="веб камеры нет"/>
        <s:Label id="wmic" visible="false" x="71" y="369" width="180" height="29" color="#F50C0C" fontSize="21" text="микрофона нет"/>
        <s:Label id="labelSec" visible="false" x="94" y="65" width="100" height="21" color="#EB0D0D" fontSize="12"/>
        <s:TextInput id="fileName" x="294" y="375"/>
        <s:Button x="430" y="376" width="95" label="Обзор" click="browseHandler()"/>
        <s:Button id="btnSend" x="533" y="376" width="83" label="Загрузить" enabled="false" click="onFileSend(event)"/>
        <s:Label x="296" y="359" width="170" text="Загрузка файла"/>
       
           <mx:List id="fileList" x="305" y="129" width="298" height="24"/>
        <s:Label id="fl1" visible="true" x="305" y="117" width="299" backgroundColor="#F1EAEA"
           text="Кликните по названию файла,чтобы его сохранить"/>
        <s:Label id="fl2" visible="true" x="308" y="103" width="296" backgroundColor="#F6EFEF"
           fontWeight="bold" text="Получен файл"/>
       
        <s:Label id="load1" y="218" right="30" width="289" height="30" color="#F80F0F" fontSize="14"
           horizontalCenter="139" text="Загрузка :  0 байт" textAlign="center"
           verticalAlign="middle"/>
        <s:Label id="fileSizeError" x="309" y="261" width="309" height="34" color="#F51F0E"
           text="Размер файла не может быть более чем 14 Мбайт!!!"/>
       
       
      </mx:Application>

       

      </s:Application>