简体   繁体   中英

ExternalInterface not working in ie9

I am having problems with External interface and IE9. The swf objects play fine but none of the information input is transferred to the cookies that should be set. I have seen that there are other questions similar to this but have not been able to solve my problem using them. THis is the html we are using

<div id="flashcentre">
<object type="application/x-shockwave-flash"data="http://workingflashlink" width="600"  height="450">
<param name="movie" value="http://workingflashlink">
</object>
</div>

then the flash, this is were I suspect the problem is...

if (ExternalInterface.available) 
{ 

var CookieName:String = "unitsWeekTotal"; 
var CookieValue = unitsWeekTotal; 

ExternalInterface.call("setCookie", CookieName, CookieValue);
} 

Then the Javascript inside script tags

function setCookie(CookieName, CookieValue, expiredays)
{value=CookieValue;

var ExpireDate = new Date ();

ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 24 * 3600 * 1000));

document.cookie = CookieName + "=" + escape(value) +

((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString());
}

Any help would be greatly appreciated, if I have overlooked a solution that is already present. I think it is the flash because I am pretty new to flash coding.

thanks in advance

Have you tried adding AllowScriptAccess to your flash embed? Without it, Flash cannot have access to your browser's javascript.

<param name="allowscriptaccess" value="always" />

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM