gpt4 book ai didi

php - IE SCRIPT16389 错误与 Flash ExternalInterface 回调和 JQuery slider

转载 作者:搜寻专家 更新时间:2023-10-31 20:51:47 27 4
gpt4 key购买 nike

我在使用 Internet Explorer 时遇到了一个非常奇怪的问题,在我的网站上,我正在使用 JQuery AnythingSlider 插件来显示一些视频。每当有人滑到下一个视频时,我都会有一个闪回:

import flash.external.ExternalInterface;
ExternalInterface.addCallback("movie_pause",player.pause);

和:

var obj = swfobject.getObjectById($(this).attr('id'));
if(obj){
obj.movie_pause(); //This is where the error takes place
}

现在奇怪的是,当页面首次加载时,一切运行正常。然而,刷新后,或者只是随机滑动几次后,IE 开始抛出错误 SCRIPT16389: Unspecified Error 并指向上面的行。但是如果我用 IE 调试,它会指向:

function __flash_addCallback(instance, name) {
instance[name] = function() {
return eval(instance.CallFunction("<invoke name=\""+name+"\" returntype=\"javascript\">" + __flash__argumentsToXML(arguments,0) + "</invoke>"));
}
}

我正在使用 swfObject 嵌入我的视频:

<object id="testimonial_{testimonials_ID}" 
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="720" height="480">
<param name="movie" value="<?php echo content_url();?>videos/player/agflvplayer.swf">
<param name=FlashVars value="id=testimonial_{testimonials_ID}&flvurl=<?php
echo content_url();?>{testimonials_url}&player_skin=<?php
echo content_url();?>videos/player/SkinOverAllNoCaption.swf&volume=0">
<param name="wmode" value="transparent">
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="<?php echo content_url();?>videos/player/agflvplayer.swf" width="720" height="480">
<param name=FlashVars value="id=testimonial_{testimonials_ID}&flvurl=<?php
echo content_url();?>{testimonials_url}&player_skin=<?php
echo content_url();?>videos/player/SkinOverAllNoCaption.swf&volume=0">
<param name="wmode" value="transparent">
<!--<![endif]-->
<p>Alternative content</p>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>

可以看一下问题http://people.oregonstate.edu/~egliju/agtools/welcome/test/'> http://people.oregonstate.edu/~egliju/agtools/welcome/test .我能找到的最近的问题是 ExternalInterface not working in IE after page refresh但没有答案(他们只是建议使用 swfobject,我也是)。

最佳答案

好吧,看来我找到了解决这个问题的方法。它似乎必须归因于 Internet Explorer 缓存 Flash 播放器并且出于某种原因,这会导致问题。所以我通过将电影参数 url 更改为对每个播放器不同的内容来欺骗它每次都重新加载。

<param name="movie" value="player/player.swf?no_cache=<?php echo rand();?>">

关于php - IE SCRIPT16389 错误与 Flash ExternalInterface 回调和 JQuery slider ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6698543/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com