Reputation: 155
I have a SWF that contacts a php script all on the same domain. In the first case both are hosted behind the same domain and communicate with no problem. Everything is working great.
However when I take the same markup that embeds the SWF and paste it on another site (using a full qualified path for the swf in both the locally hosted and remotely hosted code), the SWF no longer communicates with the php script I wrote.
I added a cross domain file to my site which looks like this.
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy
SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="*" />
</cross-domain-policy>
I added this cross domain file to both the root of my hosted domain and also to the directory where the swf is being hosted. However neither have fixed the problem. Can someone tell me why my SWF isn't communicating with my PHP script and how I can get it working?
Upvotes: 1
Views: 397
Reputation: 2174
Make sure that your canonical redirection is not getting in the way of the script. I noticed that you don't redirect the same in both domains and perhaps you are targeting the script with the valid prefix in both, i.e:
It might not be the same www.d3-systems.com to d3-systems.com...
Upvotes: 0
Reputation: 808
allowScriptAccess
is an embed parameter for letting the SWF use javascript in its containing DOM. so it won't affect cross domain access.
the crossdomain.xml
file should be all you need to add to the webroot of the external domain that the SWF is trying to communicate with.
Can you double check that you are not getting a 404 error or some other HTTP problem when trying your crossdomain communication? are any error exceptions being thrown that can help you debug the issue.
Post a link if you can.
Upvotes: 1
Reputation: 1356
Try adding allowScriptAccess="always"
parameter to your embed and object tag.
Upvotes: 0