2 Replies Latest reply on Feb 19, 2010 10:30 PM by satheeshpallath12

    Stratus connection Problem


      i am sad because Stratus connection Problem......



      Plz correct me then



      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="connect()">
      import flash.events.NetStatusEvent;
      import flash.net.NetConnection;
      import flash.net.NetStream;


      import mx.controls.Alert;;


      private const StratusAddress:String = "rtmfp://stratus.adobe.com";
      private const DeveloperKey:String = "Developer Key";
      private var nc:NetConnection;
      private var sendStream:NetStream;
      private var recvStream:NetStream;
      private var txt:String;


      private var nearID:String;
      private function connect():void
      nc = new NetConnection();
      nc.connect(StratusAddress + "/" + DeveloperKey);


      private function netConnectionHandler(event:NetStatusEvent):void
                     t1.text = event.info.code;
                             t2.text = nc.nearID;


      private function asyncErr(event:AsyncErrorEvent):void


          <mx:TextArea x="106" y="63" height="25" width="500" id="t1"/>
          <mx:Text x="80" y="63" text="Text" id="text1"/>
          <mx:TextArea x="97" y="89" width="116" height="30" id="t2"/>
          <mx:Text x="80" y="90" text="ID"/>
          <!--<mx:Button x="148" y="159" label="SEND" click="sendStream()"/>-->

        • 1. Re: Stratus connection Problem
          Michael Thornburgh Adobe Employee

          what happens or doesn't happen?


          if i copy and paste that code into Flex Builder, set the required Flash Player version to 10.0.0, and replace "Developer Key" with my actual Stratus developer key, it works fine for me in Flash Player 10.0.  i get an alert box with "1" in it, and then i have "NetConnection.Connect.Success" and a peerID in the text boxes.


          are you getting different NetStatusEvent codes, perhaps after a timeout?  maybe you have a firewall issue.  or perhaps you aren't running this on at least Flash Player 10.0, or haven't set the compiler to target the right version of Flash Player.



          • 2. Re: Stratus connection Problem

            Its is your firewall issue.No problem for the code.Its

            working one.