1 Reply Latest reply on Jun 1, 2008 11:10 AM by mirkasim

    Flash.net.socket crossdomain

    tim.romanowski
      I am trying to connect a flash application to ActiveMQ through Stomp. To do this I am opening a flash.net.socket to a host and port on another domain. The flash app works fine on its own. However when we host it on a web page we are not connecting the socket. ( or at least we think that is the problem )

      here is a copy of our cross domain file


      <cross-domain-policy>
      <allow-access-from domain="*.foo1.com" to-ports="5432" secure="false"/>
      <allow-access-from domain="*.foo2.com" to-ports="5432" secure="false"/>
      <allow-access-from domain="*.foo3.com" to-ports="5432" secure="false"/>
      </cross-domain-policy>

      It also seems that we are not getting any feedback from the flash.net.socket. We are not getting an exception
      or any of the events raised.

      this.socket = new flash.net.Socket( this.host, this.portNumber );
      this.socket.addEventListener( Event.CONNECT, this.SocketConnected );
      this.socket.addEventListener( ProgressEvent.SOCKET_DATA, this.ReadDataFromSocket );
      this.socket.addEventListener( Event.CLOSE, this.CloseHandler );
      this.socket.addEventListener( IOErrorEvent.IO_ERROR, this.IOErrorHandler );
      this.socket.addEventListener( SecurityErrorEvent.SECURITY_ERROR, this.SecurityErrorHandler );
      this.socket.connect( this.host, this.portNumber );

      execution goes past the connect call, but none of the events are raised.

      Any help would be greatly appreciated

      Thank you

      Tim