My problem: I have a program in Flex3 that accesses a server. The program itself is on a server and accessed through a web browser. The point is that I don’t want to hardcode in the swf file the IP of the server to access, since it changes and for various other reasons…
How can I do that? Can I put a file in the same directory and what then?
To access a config file on the same server as the SWF, you should be able to use an
HTTPServiceorURLLoaderwith a relative URL rather than absolute. You can get fancier (changing ports) by accessing theurlfield of your base Application and creating a new absolute URL from that.If the SWF is hosted separately from the HTML, you can use
BrowserManagerurl to build your config url instead.