Hi,

I have currently two tasks that kinda not work, because of Flash
security handling. When I say "kinda", I mean they do work in the
normal flash IDE but not in an live enviroment. I am aware however
that this two ways are totally different to each other....

...btw I need this working on a flash 7 plugin.....

..so here is what I want to do:

1. XMLSocket

I have an flash application that needs to connect to a Server
Application via a Socket. The only Socket implementation in AS 2 is
the XMLSocket, which is ok, since you can grap the raw data and do not
require a xml structure.

Now, lets say may webserver is 192.168.1.200 and I have a
Communication Server on 192.168.1.300.

Question #1 is it even possible to connect to 192.168.1.300 ? #2 if yes, how ?

I heard of 3 ways regarding this problem :
#1 does not work, Server Application needs to be same host as webserver
#2 works with "loadPolicyFile"
#3 works when editing local flash player settings
kinda #4 port needs to be greater 1024

Anyone who can give me, something like a real answer here what works
what does not.

Here is a little bit of code :

System.security.loadPolicyFile("xmlsocket://radioserver:5025");

var host:String = "radioserver";
var port:Number = 5025;


var socket:XMLSocket = new XMLSocket();

socket.onData = function (str:String) {
    out(str);
}

socket.onConnect = function(success) {
    if(success) {
        out("successfully connected");
    } else {
        out("connection failed !!!!");
    }
}


socket.onClose = function() {
    out("lost connection");
}




out("socket test");
socket.connect(host,port);


function out(s:String) {
    output.text += s + "\n";
    if (output == undefined) trace(s);
}

I do see the radioserver, getting the policy request and sends me some
data back

<cross-domain-policy><allow-access-from domain="*\"
to-ports=\"5025\"/></cross-domain-policy>

Unfortunately, still not working

Task 2. XML.load

Well this is pretty much as above, works in the ide and not on the
webserver. Do the same rules apply to the XML.load as to XMLSocket ?


I really hope someone could give an answer. Thanks

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

Reply via email to