1 Reply Latest reply on Sep 14, 2009 12:05 AM by FMSer.cn

    Cannot connect to stratus from adobe air 1.5???

    FlashNewbie408

      Hi,

      I have tried this code from flash actionscript 3 and it connected to stratus and the event netConnectionHandler was called .  When I cutted and pasted it to ADOBE  AIR 1.5 and tested it. Nothing happened.  Did I forget something to make it to work in Adobe Air 1.5?

      Thanks

       

      var netConnection:NetConnection;
      var ns:NetStream;

                netConnection = new NetConnection();
          netConnection.addEventListener(NetStatusEvent.NET_STATUS, netConnectionHandler);
          netConnection.connect("rtmfp://stratus.adobe.com/8a5434f1fe6ca34eb1b1cc79-d3498defa7ba");
       
         
      function netConnectionHandler(event:NetStatusEvent):void{
          trace(event.info.code);
         }

        • 1. Re: Cannot connect to stratus from adobe air 1.5???
          FMSer.cn

          Following code can work well in AIR1.5.

          Perhaps you developer key is wrong,it is '8a5434f1fe6ca34eb1b1cc79-d3498defa7ba',not '8a5434f1fe6ca34eb1b1cc79-d3498 defa7ba'.

          Please check it.

           

           

          stratusPath="rtmfp://stratus.adobe.com/8a5434f1fe6ca34eb1b1cc79-d3498defa7ba/";
          myNC=new NetConnection();
          myNC.client=this;
          myNC.addEventListener(NetStatusEvent.NET_STATUS,stratusStatus);
          myNC.addEventListener(SecurityErrorEvent.SECURITY_ERROR,securityError);
          myNC.addEventListener(AsyncErrorEvent.ASYNC_ERROR,asyncError);
          myNC.connect(stratusPath);