【发布时间】:2012-02-06 10:49:55
【问题描述】:
我在使用外部接口和 IE9 时遇到问题。 swf 对象可以正常播放,但没有任何信息输入传输到应设置的 cookie。我已经看到还有其他类似的问题,但无法使用它们解决我的问题。这是我们正在使用的html
<div id="flashcentre">
<object type="application/x-shockwave-flash"data="http://workingflashlink" width="600" height="450">
<param name="movie" value="http://workingflashlink">
</object>
</div>
然后是闪光灯,这是我怀疑的问题是......
if (ExternalInterface.available)
{
var CookieName:String = "unitsWeekTotal";
var CookieValue = unitsWeekTotal;
ExternalInterface.call("setCookie", CookieName, CookieValue);
}
然后是script标签里面的Javascript
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());
}
如果我忽略了已经存在的解决方案,我们将不胜感激。我认为这是闪存,因为我对闪存编码很陌生。
提前致谢
【问题讨论】:
标签: javascript flash internet-explorer-9 externalinterface