2013-01-24 45 views
0

開始&停止&暫停按鈕的工作聲音,但我無法控制音頻滾動條 這是我的代碼>>>我的代碼的目標是控制兩個音頻中同時不使用HTML5如何使用JavaScript來控制嵌入標籤

<HTML> 
    <HEAD> 
     <SCRIPT LANGUAGE="JavaScript"> 
      function play() { 
       window.document.embeds[0].Play() 
       window.document.embeds[1].Play() 
      } 
      function stop() { 
       window.document.embeds[0].Stop() 
       window.document.embeds[1].Stop() 
      } 
      function start() { 
       window.document.embeds[0].Rewind() 
       window.document.embeds[1].Rewind() 
      } 
      function forward() { 
       window.document.embeds[0].Forward(); 
       window.document.embeds[1].Forward(); 
      } 
      function forward() { 
       window.document.embeds[0].forward(); 
       window.document.embeds[1].forward(); 
      } 
      function forward() { 
       window.document.embeds[0].back(); 
       window.document.embeds[1].back(); 
      } 
     </SCRIPT> 
    </HEAD> 
    <BODY onLoad="start()"> 
    <EMBED SRC="Sound/Egypt.wav" NAME="video" AUTOSTART="false"> 
     <EMBED SRC= "Sound/Madina.wav" AUTOSTART="false"> 
      <FORM> 
       <INPUT TYPE="BUTTON" VALUE="Reset" onClick="start()"> 
       <INPUT TYPE="BUTTON" VALUE="Play" onClick="play()"> 
       <INPUT TYPE="BUTTON" VALUE="Pause" onClick="stop()"> 
       <INPUT TYPE="BUTTON" VALUE="<<" onClick="forward()"> 
       <INPUT TYPE="BUTTON" VALUE=">>" onClick="backward()"> 
      </FORM> 
    </BODY> 
</HTML> 
+0

不知道這是否可以在不HTML5來實現。爲什麼不去?作爲html5的 –

+1

不適用於所有瀏覽器 –

回答

0
function ScrollSound(time){ 
    var x = document.getElementById("first");    
    x.SetTime(time+ x.GetTime()); 
    var y = document.getElementById("second"); 
    y.SetTime(time+ y.GetTime()); 
}