Server-Side Policy Files For Permitting Access To Data - MACROMEDIA FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH Manual

Learning actionscript 2.0 in flash
Table of Contents

Advertisement

Server-side policy files for permitting
access to data
A Flash document can load data from an external source by using one of the following data
loading calls:
XML.load()
LoadVars.sendAndLoad()
MovieClip.loadVariables()
(
NetServices.createGatewayConnection
libraries (RSLs), or assets defined in another SWF file, at runtime. By default, the data or RSL
must reside in the same domain as the SWF file that is loading that external data or media.
To make data and assets in runtime shared libraries available to SWF files in different
domains, you should use a cross-domain policy file. A cross-domain policy file is an XML file
that provides a way for the server to indicate that its data and documents are available to SWF
files served from certain domains, or from all domains. Any SWF file that is served from a
domain specified by the server's policy file is permitted to access data, assets, or RSLs from
that server.
If you are loading external data, you should create policy files even if you don't plan to port
any files to Flash Player 7. If you are using RSLs, you should create policy files if either the
calling or called file is published for Flash Player 7.
For more information, see the following topics:
"Allowing cross-domain data loading" on page 702
"About custom policy file locations" on page 704
"About XMLSocket policy files" on page 705
Allowing cross-domain data loading
When a Flash document attempts to access data from another domain, Flash Player
automatically attempts to load a policy file from that domain. If the domain of the Flash
document that is attempting to access the data is included in the policy file, the data is
automatically accessible.
Policy files must be named crossdomain.xml, and can reside either at the root directory or in
another directory on the server that is serving the data with some additional ActionScript (see
"About custom policy file locations" on page
communicate over HTTP, HTTPS, or FTP. The policy file is specific to the port and protocol
of the server where it resides.
702
Understanding Security
,
XML.sendAndLoad()
,
loadVariables()
,
XMLSocket.connect()
). Also, a SWF file can import runtime shared
704). Policy files function only on servers that
,
LoadVars.load()
,
loadVariablesNum(),
, and Macromedia Flash Remoting
,

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH and is the answer not in the manual?

This manual is also suitable for:

Flash 8

Table of Contents