---------- Forwarded message ----------
From:
DannyT <address@hidden>Date: 8 September 2010 13:27
Subject: Re: [Swftools-common] Cross domain issue
To: Chris <
address@hidden>
Finally figured it out, for anyone else having the same issue:
This is what you want to call on your SWFLoader prior to loading your desired swf:
this._swfLoader.trustContent = true;
this._swfLoader.loaderContext = new LoaderContext(true, ApplicationDomain.currentDomain, SecurityDomain.currentDomain);Then your crossdomain.xml needs to be formed a-la:
<?xml version="1.0"?><cross-domain-policy>
<allow-access-from domain="www.mydomain.com" />
<allow-access-from domain="*.otherdomain.com" />
</cross-domain-policy>Originally the cross-domain-policy tag had the following entry (as taken from
adobe.com/crossdomain.xml) which for some reason prevented it from working:
<site-control permitted-cross-domain-policies="by-content-type"/>All good now though.
On 8 September 2010 12:39, DannyT
<address@hidden> wrote:
Unfortunately not, however I'm unsure of exactly what to do with regards to this response:
"have you set the local-with-network priviledge for your
generated swf files? do you generate flash9 swfs? the switch is -T9
also, when you're loading those swf you have to make sure you use a SecurityContext for your Loader call (AS3):
yourLoaderObject.load(new
URLRequest(url), new LoaderContext(false,
ApplicationDomain.currentDomain, SecurityDomain.currentDomain));"
The swfs were compiled with the T9 switch, but with regards to the loadercontext stuff I've tried playing around with it but not getting any difference, I'm loading the swfs using a flex SWFLoader so can't pass it as a parameter of the load method however settting it on the loader before load is called doesn't seem to work, I can get varying security errors but nothing works.
I've also tried using charles to check the crossdomain.xml file is loaded from the target domain and there is never any request for it so wondering if this is something that could be an issue?
Really confused with all this!
On 8 September 2010 11:31, Chris
<address@hidden> wrote:
On Wed, 8 Sep 2010 10:38:43 +0100
DannyT <
address@hidden> wrote:
> I'm trying to host the swfs generated by pdf2swf over a cdn, I've setup a
> crossdomain policy file and the swfs loaded are purely for viewing..
> Can anyone help with this? All I want to do is load a swf from a different
> sub-domain into my application for viewing.
Does this Mailing-List Archive entry help, at all?
http://lists.nongnu.org/archive/html/swftools-common/2009-06/msg00108.html
Regards,
Chris.