Hi,

If you are trying to use a socket, you can make the socket server respond to a socket request...

The examples on Adobe did not work for us, but if you include their code in your own socket server, Flash will request the policy-file from there too.

I am not sure how to do this in Python, but you can write the crossdomain xml out to the socket... Our socket server just does something like this:

   #pseudo code.
#if($request matches "policy-file-request") { #$packet = '<cross-domain-policy><allow-access-from domain="*" to-ports="*" /></cross-domain-policy>'; #for each ($socket-requesting) {
       # $socket-requesting->write($packet);
       #}
   #}
Also, if you are serving the crossdomain.xml over a HTTP connection, it needs to be in the "webroot" directory:

        http://192.168.0.3/crossdomain.xml


   HTH

   Glen

Sidnei Vladisauskis wrote:
Hey folks,

I´m having a great problem with connection between a flash interface and
socket python.

When run my SWF into flash all work normal, my socket accept my conection
and my messenges.

But when I run my SWF embeded in html (using firefox) my socket recive
<policy-file-request/> messenge.

I read this article:
http://www.adobe.com/devnet/flashplayer/articles/socket_policy_files.html

But still not work.

My socket is host in http://192.168.0.2:10201
My html with swf is host in http://192.168.0.3/transmissao

I tried this:
Security.loadPolicyFile("http://192.168.0.3/transmissao/crossdomain.xml";);
(in my code into the SWF)

It is my crossdomain.xml:
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
   <site-control permitted-cross-domain-policies="master-only"/>
   <allow-access-from domain="*" to-ports="*" />
</cross-domain-policy>

I tried <site-control permitted-cross-domain-policies="all"/> too, but no
success.

I tried send crossdomain from socket with sendall, but no success too.

I tried run all in some one server, but...

Somebody, have a solution?

Thanks a lot...
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



--

Glen Pike
01326 218440
www.glenpike.co.uk <http://www.glenpike.co.uk>

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to