如何使網頁中的MidiaPlayer播互動視訊

希望按下有視訊超連結的按鈕後,

使在同一個網頁中Active 控制項的MidiaPlayer播放該按鈕的視訊連結

2 Answers

Rating
  • Anonymous
    1 decade ago
    Favorite Answer

    <html><head><meta name="ProgId" content="FrontPage.Editor.Document"><title>MTV欣賞</title><base target="_self"><meta http-equiv="Page-Enter" content="revealTrans(Duration=3.0,Transition=23)"><meta http-equiv="Page-Exit" content="revealTrans(Duration=3.0,Transition=23)"><meta http-equiv="Site-Enter" content="revealTrans(Duration=3.0,Transition=23)"><meta http-equiv="Site-Exit" content="revealTrans(Duration=3.0,Transition=23)"><style> <!-- body, img, a {cursor:crosshair};div, span{cursor:crosshair}; --> </style><STYLE>BODY {SCROLLBAR-FACE-COLOR: #240024; SCROLLBAR-HIGHLIGHT-COLOR: #d824b4; SCROLLBAR-SHADOW-COLOR: #d824b4; SCROLLBAR-3DLIGHT-COLOR: #d824b4; SCROLLBAR-ARROW-COLOR: #d824b4; SCROLLBAR-TRACK-COLOR: #000000; SCROLLBAR-DARKSHADOW-COLOR: #9000b4; SCROLLBAR-BASE-COLOR: #000000}</STYLE></head><body><div align="center"> <button onclick="setasxfile1('mms://wmt.warnermusic.com.tw/Aboutmedia/warner/MTV/machi-030812_01v.wmv');" style="BACKGROUND-COLOR: #000000; COLOR: #ffffff" size="1">麻吉弟弟→電動王</button>  <table border="1" borderColor="#C0DCF3" cellPadding="0" cellSpacing="0" id="AutoNumber1" style="BORDER-COLLAPSE: collapse" width="114">     <tbody>       <tr>         <td width="210">           <p align="center" style="margin-top: 0; margin-bottom: 0">           <object align="middle" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" height="350" id="NSPlay" width="400" autoStar="true">                         <param name="Filename" value="makeplaylist.asx">                         <embed src>           </object>           </p>         </td>       </tr>     </tbody>   </table> </div>         <script language="JavaScript">   <!--   {      }      <!--  判  斷  IE  或  Netscape  -->   var bWin32IE;   if ((navigator.userAgent.indexOf("IE") != "-1") && (navigator.userAgent.length > 1)) {    bWin32IE = true;   } else {    bWin32IE = false;   }   <!--  Media Player  控  制  功  能  -->   function setasxfile1 (playtitle) {    MM_showHideLayers('Layer2','','hide','Layer3','','show');    if (bWin32IE == true) {     NSPlay.stop();     NSPlay.autoStar = true;     NSPlay.Filename = playtitle;    } else {                        document.NSPlay.stop();                        document.NSPlay.SetAutoStart(true);                        document.NSPlay.SetFileName(playtitle);             }   }   function start(){    if (bWin32IE == true) {     NSPlay.CurrentPosition = 0;     NSPlay.play();    } else {     document.NSPlay.SetCurrentPosition(0);     document.NSplay.Play();    }   }   function pause(){    MM_showHideLayers('Layer2','','show','Layer3','','hide');    if (bWin32IE == true) {     NSPlay.CurrentPosition = 0;     NSPlay.stop();    } else {     document.NSPlay.SetCurrentPosition(0);     document.NSplay.Pause();    }   }   function stop(){    MM_showHideLayers('Layer2','','show','Layer3','','hide');    if (bWin32IE == true) {     NSPlay.stop();    } else {     document.NSplay.Stop();     document.NSPlay.SetCurrentPosition(0);    }   }      <!--   //   var version="other"   browserName = navigator.appName;   browserVer = parseInt(navigator.appVersion);    if (browserName == "Netscape" && browserVer >= 3) version = "n3";    else if (browserName == "Netscape" && browserVer < 3) version = "n2";    else if (browserName == "Microsoft Internet Explorer" && browserVer >= 4) version = "e4";    else if (browserName == "Microsoft Internet Explorer" && browserVer < 4) version = "e3";   //-->      function MM_findObj(n, d) { //v3.0     var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {       d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}     if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];     for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;   }      function MM_showHideLayers() { //v3.0     var i,p,v,obj,args=MM_showHideLayers.arguments;     for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];       if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }       obj.visibility=v; }   }      function MM_showHideLayers() { //v3.0     var i,p,v,obj,args=MM_showHideLayers.arguments;     for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];       if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }       obj.visibility=v; }   }   //-->   </script></body></html>

  • Anonymous
    1 decade ago

    <a href=javascript: on click=Active控制項ID.src=xxxx>視訊連結</a>

Still have questions? Get your answers by asking now.