We’ve got a flash file that takes a URL parameter for redirecting on click. When it’s hosted from the primary domain, and the SWF is included in HTML from the primary domain, the redirect works properly.
However, when it’s hosted on the secondary domain, and the SWF is included in HTML from the primary domain, the redirect doesn’t work. I’ve added a crossdomain.xml file to both the primary and secondary domain, thinking that might help. The contents of both crossdomain.xml files are included below.
What is it that I’m missing?
crossdomain.xml
<cross-domain-policy>
<allow-access-from domain="*"/>
</cross-domain-policy>
EDIT: Here’s the actionscript used for the “redirect”.
actionscript
on (release) {
getURL(clickTag);
}
clickTag is a parameter we’re passing in through the querystring.
EDIT: After adding allowScriptAccess="always" to the embed code, and <param name="allowScriptAccess" value="always" /> to the object tag, the window opens, and the location goes to /undefined. Thoughts?
EDIT: As requested, here’s the actual object/embed code we’re using:
<object type="application/x-shockwave-flash" data="/files/2348.swc" width="300" height="250" class="ad" onclick="ad_click(169);">
<param name="movie" value="/files/2348.swc?clickTAG=http://www.google.com"/>
<param value="high" name="quality">
<param value="#FFFFFF" name="bgcolor">
<param value="always" name="allowScriptAccess">
<param value="transparent" name="wmode">
</object>
Try setting
allowScriptAccesstoalwaysin the object and embed tags of the including HTML.The default value is “sameDomain” for recent versions of Flash Player, which explains your current behavior.
For your edit, it may help to have more information, but you likely need to access your parameters using
_rootor_level0, rather than directly as above. See Adobe’s docs on this problem and description of_root.Based on your embed code, I still think it may be worth your while to look into
_root.Your object tag is a bit nonstandard, so there may be some issues:
clickTagvsclickTAGdataattribute URL?If you have control over the SWF, you might consider going directly to FlashVars.