-1

I want to make a chat app using socket in as3. I have already followed many examples but none of them helped much. Right now i am following this link.

I am running php at localhost using xampp.Also i have already ran policySocketServer.php,socketServer.php as written in page comments.

i am using this to load policy file

Security.loadPolicyFile("xmlsocket:127.0.0.1/chat/crossdomain.xml:843");

and to connecting to ourXMLSocket.connect("http://127.0.0.1/chat/", "9999");

but i am getting these errors

    IOErrorEvent error  Error #2031: Socket Error. URL: http://127.0.0.1/chat/
security error  Error #2048: Security sandbox violation: file:///C|/Users/irfan/Desktop/socket%5Fserver/socket%5Fserver.php/AS3%20Game%20Implementation/TestGame.swf cannot load data from http://127.0.0.1/chat/:9999.
kaif
  • 11
  • 2

1 Answers1

1

Read the error message:

Security sandbox violation: file:///C........swf cannot load data from http://....

Try running your swif from the http protocol not file protocol. That should fix the security issues.

mika
  • 1,411
  • 1
  • 12
  • 23
  • now i embed my swf in html and i am running it by using http://127.0.0.1/chat/index.html but still i am getting security error. Error #2048 – kaif Sep 18 '14 at 05:31
  • In SecurityErrorEvent.SECURITY_ERROR listener i am getting this event.text=Error #2048, event.errorID=0,nothing more than this. Yes but now no IOError is coming. – kaif Sep 19 '14 at 06:14
  • http://stackoverflow.com/questions/5157089/flex-security-sandbox-violation-error2048 – mika Oct 28 '14 at 19:13