Can you try not using a server name or port at all?
You should NEVER hard code in server names like localhost because you can't
guarantee how people will load your SWF... and when you post it on a
website, localhost is everyone's local address, not your web server.
Just say you put your SWF into an HTML web page at this location:
http://nickriviera.hostinguk.net/applications/somepage.htm but just say the host had another name, or someone accessed it via it's IP
address?
http://apps.hostinguk.net/~nickriviera/applications/somepage.htm
http://123.123.123.123/~nickriviera/applications/somepage.htm
Assuming you've just specified the SWF file in the HTML Object tag relative
to the location of the HTML file, whatever address was used to load the HTML
page will also be used to get the SWF. If you've never thought about what
goes on when you publish a SWF in an HTML page - this might be a surprise to
you. The first request will be for the HTML. This is returned by the
webserver to the browser. The browser parses the HTML and then it notices a
request for a SWF in an HTML Object tag... this means the browser makes
another HTTP GET request for the SWF... which means it will most likely use
the same host name and path to the SWF as for the HTML page. This is no
different to how GIFs and JPGs are retrieved in separate requests when the
browser encounters an HTML IMG tag.
The reason this is important to understand is due to the security sandbox
restrictions of Flash Player 7. It will not let you connect to a different
hard coded URL as
http://nickriviera.hostinguk.net/flashservices/gateway from those other HTML pages because "nickriviera.hostinguk.net" is not the
same name as "apps.hostinguk.net" or "123.123.123.123" in terms of strict
domain checking.
Try setting the gateway to just "/flashservices/gateway" or wrapping it in a
call to NetServices.getHostUrl() to get the host name and port used to load
the SWF... this way, Flash Remoting will work in any environment...
localhost or your live site.
Pete