It seems that my code can connect perfectly locally but does not connect from a website. I think its because of the policy file.
I have no idea how to call a policy file using KoolMoves.
I also have no idea where the policy link code should go.. At the beginning of the code? At the end?
I tried:
Code:
System.loadPolicyFile("http://09.isgreat.org/server/flashpolicy.xml");
Security.loadPolicyFile("http://09.isgreat.org/server/flashpolicy.xml");
System.Security.loadPolicyFile("http://09.isgreat.org/server/flashpolicy.xml");
None of these have worked and I still get a "Socket established, but connection could not be made.".
What am I doing wrong?
this is my whole code:
Code:
System.loadPolicyFile("http://09.isgreat.org/server/flashpolicy.xml");
socket = new XMLSocket() 
socket.onConnect = myOnConnect      
socket.onClose = function (){
statusText.text = "Connection terminated by server."
} 

if (!socket.connect("MYIP",80))       
{ 
    statusText.text = "Connection failed! Could not establish socket." 
} 
     

function myOnConnect(success)   
{      
    if (success) 
    { 
        statusText.text="You are connected." 
    } 
    else 
    { 
        statusText.text = "Socket established, but connection could not be made."      
    } 
}
I know my port 80 is not blocked and my IP address is right and everything.
THANK YOU for any help. =)