PDA

View Full Version : ip address of a client


rflorico
12-23-2004, 02:10 PM
Good day to all!

I just want to ask how to get the ip address of a client using flash communication server mx. I have a code here and it doesn't work. Can someone help me how to make scripts communicate from client side to server vice and vise versa, how to pass variables etc. Here's my code by the way.

client side:
out_ns.msgFromSrvr = function (msg){
mytest.text = msg;
}
server side:
application.onConnect(newClient, name){
application.acceptConnection(newClient);
if (newClient.ip == "127.0.0.1"){
var msg = "same ip";
} else {
var msg = "different ip";
}
newClient.call("msgFromSrvr", null , msg);
}

Please help. Thanks in advance!