Sorry for my bad English.
I have the following problem:
I have a .fla file, that works with Socket class. There is a server(written in Delphi XE, but it does not matter). I connect to it from my .fla. When i execute my .fla from within Flash Professional CS5 everything works fine. But when i tried to execute resulting .swf from Explorer(Win 7, Flash Player 10) i got an error:
SecurityError: Error #2010: Local-with-filesystem SWF files are not
permitted to use sockets. at flash.net::Socket/internalConnect() at
flash.net::Socket/connect() at payterminal::TLogger() at
payterminal::TMainTerminalClass() at
testterminal_fla::MainTimeline/frame1()
Socket connects to the server as follows:
Sock.connect('127.0.0.1', 5243);
I tried to change setting "Local playback security" in "File->Publish settings" to "Access network only.
Ok. Flash player starts without errors, but it's send to server the following message:
<policy-file-request/>
After this socket connection closes.
I also tried to use the method Security.AllowDomain(), but it did not made no positive results.
There was another method i tried. The server has two listening sockets. The first listening on port 843. When this socket receive the message policy-file-request it send to .swf the crossdomain file, like this:
<?xml version="1.0"?> <!DOCTYPE cross-domain-policy SYSTEM
"http://www.adobe.com/xml/dtds/cross-domain-policy.dtd"> <!-- Policy
file for xmlsocket://socks.mysite.com --> <cross-domain-policy>
<allow-access-from domain="*"/>
</cross-domain-policy>
After it the socket(843) closes. But the second listening socket gets the same message: .
After all this, my .swf is still open in Flash Player with no errors, but the socket connection is not happening. I tried different crossdomain-files, but all my attempts led me to same result.
That's the problem i have. I look forward to your help. Thanks.