PDA

View Full Version : retrieving the server address in AS?


gifpaste
10-31-2005, 09:28 PM
Is there a way to get the server address from flash?

ie, there is a swf on 3 servers, and a remoting call needs to goto the local server context root, somethign like this (but obviously cgi. is not a flash player scope)

var gateway=cgi.server_name+"/flashservices/gateway"

instead of hardcoding it for each of the swfs:

swf1: var gateway="http://server1.com/flashservices/gateway"
swf2: var gateway="http://server2.com/flashservices/gateway"
swf3: var gateway="http://server3.com/flashservices/gateway"

Flash Gordon
11-01-2005, 12:04 AM
I don't fully understand your question, but let me say a couple of things.

1) Flash get not get much information by itself, you need a server-side language for that, and then send that info to Flash
2) It looks like you doing cross-domain stuff. Make sure you put System.securities stuff in BOTH or all the swf's, the main one and the ones getting imported.