5 Replies Latest reply on Jun 22, 2011 7:43 AM by P.o.l.a.c.o

    End to End Communication with RTMFP problem

    P.o.l.a.c.o Level 1

      Hi!

      I have created a test app following this tutorial video

      http://tv.adobe.com/watch/adc-presents/control-the-desktop-with-your-mobile-device/

      On Friday it was working properly, suddenly it has just stoped working.

      The problem is that when I start 2 browsers (on the same pc) with the app the group neighbours does not seem to see each other since no notifications are received.

      Can anyone give it a try?

      What could be going on? I have tried disabling firewalls and antivirus with no luck.

      Can anyone give it a try?

      I'm using Flash Builder 4.5.

       

      This is all the code of the test web app:

       

      <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" minWidth="955" minHeight="600" applicationComplete="connect()">

      <fx:Declarations>

      <!-- Place non-visual elements (e.g., services, value objects) here -->

      </fx:Declarations>

      <fx:Script>

      <![CDATA[

      import flash.utils.getTimer;

      private var connection:NetConnection;

      private var group:NetGroup;

      private var isConnected:Boolean = false;

      private var netStream:NetStream;

      private var groupspec:GroupSpecifier = null;

       

      private function connect():void{

      connection = new NetConnection();

      connection.addEventListener(NetStatusEvent.NET_STATUS, netStatus);

      connection.connect("rtmfp:");

      }

       

      private function netStatus(event:NetStatusEvent):void{

      var infoCode:String = event.info.code;

      log(infoCode);

      switch(infoCode){

      case "NetConnection.Connect.Success":

      setupGroup();

       

      break;

       

      case "NetGroup.Connect.Success":

       

      break;

       

      case "NetGroup.SendTo.Notify":

       

      break;

       

      }

      }

       

      private function setupGroup():void{

      groupspec = new GroupSpecifier("localConnectionsTest");

      groupspec.routingEnabled = true;

      groupspec.ipMulticastMemberUpdatesEnabled = true;

      groupspec.addIPMulticastAddress("224.255.0.0",35353);

      groupspec.multicastEnabled = true;

      group = new NetGroup(connection, groupspec.groupspecWithAuthorizations());

      group.addEventListener(NetStatusEvent.NET_STATUS, netStatus);

      }

       

      private function log(str:String):void{

      txt.appendText( str + "\n");

      }

       

      protected function sendMessage(event:MouseEvent):void

      {

      log("NeighborCount " + group.neighborCount);

      group.sendToAllNeighbors("Hello! " + getTimer());

      }

       

      ]]>

      </fx:Script>

      <s:layout>

      <s:VerticalLayout />

      </s:layout>

      <s:TextArea id="txt" width="500" height="400"/>

      <s:Button label="Send" fontSize="25" click="sendMessage(event)"/>

      </s:Application>