Embedded Flash Player is not working from another domain (Cross-Domain swf access )
Posted on 18. Jul, 2008 by Sajith M.R in webworld
When I used an flv player for my website www.amvizone.com, the main problem I faced was the external embedding. So I provided the iframe embedddng method instead of embedded object like youtube. The problem was the embedded flash player only worked with the my domain (where the player.swf is placed). When I put the same embedded code with src points to http://www.amvizone.com/player.swf from another domain, the player did not work.
Recently My Friend Rahul (He is the master in flash and action scripts) gave me a solution for this. That is, you have to add cross-domain policy to your server to server the swf file to other domains.
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.
You have to create a file, crossdomain.xml and place in the root folder or any other folder where content is placed. The data in the crossdomain.xml file is shown below:
<?xml version="1.0"?><!-- http://www.foo.com/crossdomain.xml --> <cross-domain-policy> <allow-access-from domain="www.friendOfFoo.com" /> <allow-access-from domain="*.foo.com" /> <allow-access-from domain="105.216.0.40" />
</cross-domain-policy>
The above configuration allow any subdomains of foo.com or a particular ip 105.216.0.40 or www.friendOfFoo.com
If you need to provide access to all domains , you can use the following xml:
<?xml version="1.0"?> <!-- http://www.foo.com/crossdomain.xml --> <cross-domain-policy> <allow-access-from domain="*" /> </cross-domain-policy>
Courtesy: Adobe.com
And special thanks to Rahul for sharing the information
For details: click here
Regards
Sajith M.R




chrisfreak
Aug 2nd, 2008
Thank you, you’ve saved my life
dream travel
Feb 16th, 2009
just wonderful !! you saved me so much work !
john locke
Jun 3rd, 2009
What is the best media player?
Albarsark
Nov 17th, 2009
hi sajith,
i try to direct embedded cooliris on my documents and need this xml.
i’v got the same problem and i foud the same solution U describe here BUT none!!! i try many time….different things…
do u thing it’s a wordpress problem ? not a xml ? a dtd ?
look here i describe better http://albarsark.com/wordpress/?cat=28
but I already succed for embedding cooiris on my page for external source like u can see on the same page…
Thanks
@+
Albarsark