javascript - How can use setTimeout() to start a Flash animation? -


i desperately trying flash animation play after 5 seconds, nothing seems make work.

this code using:

function waitfivesec() {     window.settimeout(startplaying,5000); }  function startplaying() {     window.document.getelementbyid("flashid") } 

i calling waitfivesec() function on html document:

<body onload="waitfivesec()"> 

this class project have timeline based events, have never used javascript before.

can me on this?

html flash code:

<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" />       <!-- param tag prompts users flash player 6.0 r65 , higher download latest version of flash player. delete if don’t want users see prompt. -->       <param name="expressinstall" value="scripts/expressinstall.swf" />       <param name="autoplay" value="false" />       <param name="play" value="false" />       <!-- next object tag non-ie browsers. hide 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" />         <!-- browser displays following alternative content users flash player 6.0 , older. -->         <div>           <h4>content on page requires 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> 

nothing seems wrong.

only makee sure file loaded before called html.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -