我在使用 Internet Explorer 时遇到了一个非常奇怪的问题,在我的网站上,我使用 JQuery AnythingSlider 插件来显示一些视频。每当有人滑到下一个视频时,我都会收到一个快速回电:
import flash.external.ExternalInterface;
ExternalInterface.addCallback("movie_pause",player.pause);
and:
var obj = swfobject.getObjectById($(this).attr('id'));
if(obj){
obj.movie_pause(); //This is where the error takes place
}
现在奇怪的是,当页面首次加载时,一切运行正常。然而,刷新后,或者随机滑动几次后,IE 开始抛出错误 SCRIPT16389:未指定错误并指向上面的行。但如果我使用 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 在 IE 中不起作用但没有答案(他们只是建议使用 swfobject,我就是)。