Simple Network issue?

I have a flash file that connects to my website benbart.com with a socketXML connection.

If I open the html or swf from a local machine, it will connect to the server and send data back and forth. I know this part is working because I sent people the html & swf and we were able to communicate using the files.

What is strange is that when I upload it to my website, it no longer works. Is it an AS3 problem?

I tried a crossdomain policy file. But perhaps I’m doing something wrong.

It probably is an issue with your policy file. [U]This[/U] article might help, or the links in the article might as well. Or, you could post the relevant portions of your code and policy file and someone might be able to tell what is wrong from that.

That article is helpful. But I’m completely lost.

How do I get it to load the policy file?

My code right now is: Security.loadPolicyFile(“http://benbart.com/crossdomain.xml”);

And that opens this policy file:
<?xml version=“1.0”?>
<!DOCTYPE cross-domain-policy SYSTEM “/xml/dtds/cross-domain-policy.dtd”>

<cross-domain-policy>
<site-control permited-cross-domain-policies=“all”/>
<allow-access-from domain=“benbart.com” to-ports=“7777”/>
<allow-access-from domain=“www.benbart.com” to-ports=“7777”/>
</cross-domain-policy>

I’d rather not have to use Perl or Python to make a socket policy file server, and I wouldn’t have a clue how to make it look at port 843 :-).

I’d rather not have to use Perl or Python to make a socket policy file server, and I wouldn’t have a clue how to make it look at port 843 :-).

What language are you using for your socket server? I’m pretty sure that socket servers need to be written to work with policy files, so you might have to change some of that existing code.

Thanks for all your help Krilnon. Looks like I need to suck it up and figure out how to make my PHP script listen on port 843 for the request. :slight_smile: This used to be a lot easier!

I’m still having trouble getting this to work. I was screwing around with it last night.
I tried using a PHP socket on port 843. My test server wouldn’t let me bind the address.

Then I tried adding in the code to my current PHP socket server. When flash tries to connect to the socket from the web, it connects, sends out the ?string? <policy-file-request/> and then disconnects. I’ve tried responding with the policy file information that I posted earlier and it doesn’t work. Does anyone have a working example of this? Should I ask in the server section of the forums, or would that be too many posts on the same subject?