swfobject 2.2 showExpressInstall - >如何指定所需的闪存版本?

时间:2010-03-26 17:14:27

标签: javascript html flash swfobject

使用swfobject 2.2,如何指定所需的闪存版本?我需要flash 10,但swfobject不会使用swfobject 2.2 distributable中提供的expressInstall.swf执行升级安装。如何为Flash 10进行升级安装?

1 个答案:

答案 0 :(得分:1)

以下行需要v.10:

swfobject.embedSWF("mymovie.swf", "altContent", "800", "600", "10.0.0","expressInstall.swf", {}, {}, {});

请注意,“altContent”应该是HTML中您希望替换Flash影片的某个元素的ID,而“800”和“600”分别是高度和宽度。用法示例:

<script type="text/javascript">

    var flashvars = {};
    var params = {
      allowscriptaccess: "samedomain"
    };
    var attributes = {
      id: "flashMovie",
      name: "flashMovie"
    };

    swfobject.embedSWF("myMovie.swf", "altContent", "800", "600", "9.0.0","expressInstall.swf", flashvars, params, attributes);
</script>