This restriction exists for a very good reason - it's important to stop
attacks like cross site scripting (JavaScript has this restriction too,
fwiw).
You can, however, in Flash Player 7 set up a trusted policy with a remote
server, but that remote server has to agree to let flash files served from
your domain to connect to them. To establish such a policy, you just need to
setup an appropriate crossdomain.xml file in the webroot of the remote
server.
See this article for details:
http://www.macromedia.com/devnet/mx/flash/articles/fplayer_security.html [quoted text, click to view] "mcarlson" <webforumsuser@macromedia.com> wrote in message
news:c5eaj4$s80$1@forums.macromedia.com...
> I've written an MP3 player application in Flash. It uses Flash Remoting to
> connect to a web service which provides the artists, albums and songs from
a
> database. This all works fine when the SWF is run from the same domain as
the
> Gateway server, but when I access it from a different domain on the same
> server, the data never loads.
>
> My code for setting up the connections looks like this:
>
>
>
NetServices.setDefaultGatewayURL("
http://www.mydomain.com/flashservices/gate way"
[quoted text, click to view] > );
> gatewayConnnection = NetServices.createGatewayConnection();
> jukeboxService =
>
gatewayConnnection.getService("
http://www.mydomain.com/web_services/jukebox. cfc?
[quoted text, click to view] > wsdl");
>
> If I run the the SWF from
http://www.mydomain.com/jukebox.swf everything
works
> fine.
>
> If I run it from a different domain on the same server -
>
http://www.myotherdomain.com/jukebox.swf - the data never loads.
>
> Do the domains need to be the same? This seems like it would extremely
> limiting. Is there something else I'm doing wrong? Any help would be
> appreciated.
>
> Thanks.
> - Michael
>
>