Da min browser af uransagelige årsager ikke vil åbne i nyt vindue paster jeg lige svaret fra
www.macromedia.com/support/flash - Søg selv på \"loadvariables domain\"
For security reasons, a Flash movie playing in a Web browser is not allowed to access data residing outside the Web domain from the which the SWF originated. This applies to any ActionScript command or object that may send or receive data, including including loadVariables, the XMLSocket Object\'s methods, and the XML Object\'s send and sendAndLoad commands.
For example, a SWF file loaded into a browser from
http://www.yourserver.com/flashmovie.swf may access data residing at
http://www.yourserver.com/data.txt. This is because the text file is located within the same domain, yourserver.com, as the SWF. Data files within the same subdomain (for example, dataserver.yourserver.com) would also be accessible by this Flash movie.
However, the same movie\'s attempt to load data from
http://www.NotMyServer.com/data.txt will fail. No error messages will be displayed.
Note: This security feature does not effect Flash movies playing in stand-alone projectors, only those playing in a Web browser.
Solution
The simplest solution is to move the data source to a server inside the domain of the Flash movie. To load variables from external sources, other methods must be employed.
Possible methods include:
Proxy scripting
It is possible to write a CGI script which directly makes calls to an external server in a different domain. Your Flash movie would then call this CGI script using a Load Variables action. The CGI script can be hosted in the same domain as the Flash movie, and when called, would act as a proxy to the external-domain data source. The CGI script can access the data source from the external domain, obtain the variables, then write them to the local server where they can be read by Flash.
This may cause performance issues. A CGI script which sends another call to the outside server can be server intensive. This takes time, and increases processor load on the server.
Domain Name System (DNS) aliasing
It is possible to set up a DNS entry that is an alias to an external server. When a Flash movie makes the call to a DNS alias, the DNS intercepts the URL, evaluates the request, and sends it to the outside server.
It\'s important to note that servers can be configured to not accept requests from outside domains. Some servers may return an error message instead of the expected variables. Adding DNS entries for servers outside your own domain can be problematic. This solution requires working closely with the system administrators managing the external domain servers to prevent unexpected behavior.
Additional information
The security features documented in this TechNote were added to the Flash Player at the request of developers. These enhanced security features were added after consulting industry experts, to address potential issues with data transfer to and from Flash movies.