0 Replies Latest reply on May 9, 2010 11:34 PM by orzFlex

    why can't establish a socket connection?


      As said in Adobe document :



      When policy files were first introduced in Flash Player 6, there was no  support for socket policy files. Connections to socket servers were authorized  by a policy file from the default location of the cross-domain policy file on an  HTTP server on port 80 of the same host as the socket server. To make it  possible to preserve existing server arrangements, Flash Player 9 still supports  this capability. However, Flash Player's default is now to retrieve a socket  policy file on the same port as the socket connection. If you wish to use an  HTTP-based policy file to authorize a socket connection, you must explicitly  request the HTTP policy file using code such as the following:


      Then ,why can't I establish a socket connect using the following code

                      var socket:Socket=new Socket();
                      socket=new Socket();
                      socket.addEventListener(SecurityErrorEvent.SECURITY_ERROR, handler);
                      socket.addEventListener(Event.CLOSE, handler);


      I can access the crossdomain.xml through brower.