1

我拼命想让这个 Flash 动画在 5 秒后播放,但我似乎没有做任何事情。

这是我正在使用的代码:

function waitFiveSec() {
    window.setTimeout(startPlaying,5000);
}

function startPlaying() {
    window.document.getElementById("FlashID")
}

然后我在 HTML 文档上调用 waitFiveSec() 函数:

<body onload="waitFiveSec()">

这是一个课堂项目,我必须做基于时间线的事件,所以我以前从未真正使用过 JavaScript。

谁可以帮我这个事?

HTML Flash 代码:

<div id="animation">
  <p>
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="365" height="295" id="FlashID" title="Tractor Animation">
      <param name="movie" value="../Multimedia elements/Animations/Tractor Animation Opt 2.swf" />
      <param name="quality" value="high" />
      <param name="wmode" value="opaque" />
      <param name="swfversion" value="7.0.70.0" />
      <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
      <param name="expressinstall" value="Scripts/expressInstall.swf" />
      <param name="autoplay" value="false" />
      <param name="PLAY" value="false" />
      <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
      <!--[if !IE]>-->
      <object type="application/x-shockwave-flash" data="../Multimedia elements/Animations/Tractor Animation Opt 2.swf" width="365" height="295">
        <!--<![endif]-->
        <param name="quality" value="high" />
        <param name="wmode" value="opaque" />
        <param name="swfversion" value="7.0.70.0" />
        <param name="expressinstall" value="Scripts/expressInstall.swf" />
        <param name="autoplay" value="false" />
        <param name="PLAY" value="false" />
        <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
        <div>
          <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
          <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
        </div>
        <!--[if !IE]>-->
      </object>
      <!--<![endif]-->
    </object>
  </p>
  <p>&nbsp;</p>
</div>
</div>
4

1 回答 1

0

似乎没有错。

仅确保在从 html 调用之前加载文件。

于 2013-05-19T09:05:55.260 回答