微软终于发布了ActiveX的补丁了

2006.04.1208:14

如果今天更新 Windows,会发现所有需要交互操作的 ActiveX 内容都需要点击才可以使用,Flash 内容自然收到影响,这个问题前一段在Flash社区吵得沸沸扬扬,今天终于来了。解决方法可能都知道了,就是使用 Javascript 嵌入 Flash 内容,比如用 Flashobject(现已改名为SWFObject),或者 Adobe 自己提供的脚本。虽然很久以前微软就说了要做这个处理,但估计还是会有很多用到 Flash (或者别的 ActiveX 控件)的网站(特别是国内网站)连听都没听过这个东西,接下来应该有的闹腾了。

刚发现另外一种嵌入 Flash 内容的方法,去掉了不合标准的 embed 标签,只使用 object 标签。这样既保证了浏览器兼容性,又可以通过验证,还不受 IE 这个 ActiveX 更新的影响,按照目前我的测试来看简直完美:(消息来自聆听小区,感谢)

<object type="application/x-shockwave-flash" data="文件地址"
width="宽度" height="高度">
    <param name="movie" value="文件地址" />
    如果不能显示flash的替换内容,可以是HTML内容
</object>

经测试IE5, IE6, Firefox 1.5, Opera8, Opera9下都可以正常使用,我没有其他浏览器了,哪位朋友有条件可以帮忙测一下。

再次更新:

发现上面提到的方法,在 SWFObject 上也提到了,这种方法叫 Flash satay,SWFObject认为它和自己相比有如下缺点:

  • Accessibility issues. - Using Flash Satay, some screen readers (like JAWS) will ignore your Flash content.
  • With changes from the Eolas patent dispute, users will have to first click on your Flash content to ‘activate’ it before interacting with it. More info here.
  • There is noplug-in detection. - Same as above - With no plug-in detection, users may see broken or no content. When the Flash player encounters a Flash movie embedded in a page, it will try to play it no matter what the version is. So if you have Flash player 6 installed, and encounter a Flash 7 movie, your plug-in will try to play it, possibly causing odd behavior.
  • Some methods of Flash satay don’t stream the Flash movie to the player - So this method may require ‘holder’ swf movies that your movie is loaded in to. This makes passing variables from FlashVars parameters a hassle and make it a pain to maintain Flash content as you now have twice as many swf files floating around your web server.
  • Older Safari versions ignore param tags - Up until version 2.0 (on Tiger) or 1.3 (on Panther) and possibly 1.2.8 (pre Panther) Safari would completely ignore the param tag. This meant that if you tried to set other options using them, like Flashvars or Align, Salign, etc. Safari would not see those values.

不过好像第二点并不是那么回事?明明在我这里不受这个影响啊,等下来发信问问。在我看来除了第二点,比较有问题的就是第四点了,看来这方法也不是很妙。

5 Comments Comment RSS »

The URI to TrackBack this entry is: http://old9.blogsome.com/2006/04/12/activex-patch-in-ie/trackback/

  1. 奇怪了,我按照楼上的方法,写了一个
    但是还是需要激活控件,为什么会这样呢?谢谢。

    Comment by 秦歌 — 2006.5.22 @ 12:37

  2. 晕,第一次没有注意code被过滤掉了

    Comment by 秦歌 — 2006.5.22 @ 12:39

  3. demo请看http://www.dancewithnet.com/special/objectflash.html

    Comment by 秦歌 — 2006.5.22 @ 14:08

  4. 看来这种方法还是不保险,正如我最后引用的那一段所说……
    所以建议你还是用SWFObject吧,也很方便的。

    Comment by old9 — 2006.5.22 @ 16:51

  5. 呵呵,在以前总结这个问题解决方案(http://www.dancewithnet.com/article.asp?ID=270)时也建议用SWFObject,但是对于大量已存在的页面问题或者对于一些普通用户来讲,如果有修改页面的HTML标签的方法,反而很合适,虽然这种方法总是上比较费力。

    Comment by 秦歌 — 2006.5.22 @ 17:34

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>


为防评论机器人,劳驾您输入图片中的字符 :)
captcha