Cross Domain Policy File
By default Flash Player 7 and later prevents a SWF served from one domain from accessing data, object, or variables from SWF files served from different domains. Nor can a SWF file served from one domain load data from another domain.
Excerpt from 2004 Help Panel: "About allowing cross-domain data loading"
<?xml version="1.0"?> <!-- Example Cross Domain Policy File --> <!-- http://www.dv8flasher.com/crossdomain.xml --> <cross-domain-policy> <allow-access-from domain="*.mgbg.com" /> </cross-domain-policy>
(Note: localhost can access data from any domain)
With this policy we see the data after being loaded return undefined
[swf x=550 y=100 menu=false]http://www.tv5.com/elections/test.swf[/swf]
Why? The domain tv5.com is not listed in the policy file as an allowed domain.
And here we see data after being loaded returned as a string
[swf x=550 y=100 menu=false]http://media.mgbg.com/wkrg/flash/crossDomain/test.swf[/swf]
This works do to policy file having mgbg.com listed as an allowed domain.
Also, in the example policy file you will see the usage of the asterisk (*) or aka wildcard. If your a PC user you'll probably know the power of the wildcard (*). The wildcard makes it very easy for a user or developer to allow access to the data on his or her server for any domain serving the SWF to access their data.
<?xml version="1.0"?> <!-- Example Cross Domain Policy File --> <!-- http://www.dv8flasher.com/crossdomain.xml --> <cross-domain-policy> <allow-access-from domain="*" /> </cross-domain-policy>
One element yet to be discovered is how to accurately acknowledge the type of error, if the SWF is unable to access the remote data.
To be continued...
|Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)|
|Thread||Thread Starter||Forum||Replies||Last Post|
|How to Configure Cross Domain Policy?||freaksarise||Flash CS3 / Flash 9||1||12-28-2009 11:44 AM|
|Cross Domain Issues (JS)||jwaldrip||Flash 8||0||11-01-2006 07:49 PM|
|A useful tips about how to extract .swf file from a PowerPoint file||susanzheng||General Flash||0||11-02-2005 07:56 AM|
|FlashMove recent tussle with domain issue||FlashMove||Members Cafe||6||03-28-2005 06:31 PM|
|Cross Domain Content Loading with loadPolicyFile||whitenoiseie||Actionscript 2.0||2||08-20-2004 06:32 PM|