Question

I'm trying to create an app that multiple users would log into a server hosted over the local network. When testing the app in Flash Builder it connects, but when I run it on my phone it does not.

I'm using XMLSocket like so:

        private function connect(event:MouseEvent):void {           
            xmlSck = new XMLSocket();
            xmlSck.addEventListener(Event.CONNECT, onConnect);
            xmlSck.addEventListener(SecurityErrorEvent.SECURITY_ERROR,onSecurityError);
            xmlSck.addEventListener(IOErrorEvent.IO_ERROR,onIOError);
            Security.loadPolicyFile("xmlsocket://http://manbearpig.org/dev/flashpolicy.xml");
            xmlSck.connect("127.0.0.1", 8080);
        }

I'm not really sure about the policy file, I just threw it in there hoping that might do something.

Here's a video to illustrate what I mean

Was it helpful?

Solution

You need to replace the ip address on this line:

xmlSck.connect("127.0.0.1", 8080);

To be the IP address of your computer. 127.0.0.1 is the loopback address, I am guessing you do not have a server running on your phone :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top