• 风格:
网站首页
新闻资讯
文章中心
影视录音
歌曲音乐
精美图片
资源下载
在线商城
网页特效
用户信息
综合导航
  • 流行第一线
  • 流行第一线
  • 站内新闻
  • 临沂新闻
  • 新浪新闻
  • 站内风彩
  • 美女帅哥
  • 桌面图片
  • 节目录音
  • 影片采集
  • 精彩推荐
  • 国语歌曲
  • 网络歌曲
  • 情感故事
  • 忘忧秀豆
  • 娱乐幽默
  • 技术文章
  • 流行第一线
  • 流行第一线
  • 留言本站
  • 博客日志
  • 会员娱乐
  • 动漫频道
  • 酷站推荐
  • 友情连接
  • 程序讨论
您的位置:首页 >> 文章频道 >> 加上SWF格式影视代码搞定56|优酷|土豆影视
文章阅读

加上SWF格式影视代码搞定56|优酷|土豆影视

作者:网络 | 来源:网络转摘 | 时间:2008-01-25 | 阅读权限:游客身份 | 会员币:0

影视播放器问题:比如:有人加了支持56视频...在IE6.0看一切正常,在IE7.0就不正常了,播放不了...等等...故加代码要考虑IE7.0,必定现在很多人IE6.0也会慢慢全部升级到IE7.0....
我觉得最简单扼要的方案就是加上"SWF"格式的Flash播放器代码...不管是:56视频|优酷影视|土豆影视....都可以用此代码来播发这些影视....就不用找这找那代码了!

1.在Video/vidplayer.asp加入如下代码 <!-- ----swf播放器代码开始-------->
<%elseif ftype="swf" then%>
<script language="javascript">
function initPlayer()
{
document.player.SetWantMouseEvents(true)
}
function noRB()
{
setTimeout("alert('右键禁止')",400)
}
function killErr(){
      return true;
}
window.onerror=killErr;
</script>
<script language="vbscript">
sub player_OnRButtonDown(ByVal nFlags, ByVal nX, ByVal nY)
 if player.getfullscreen() then
  player.SetOriginalSize()
  noRB()
 else
  msgbox("右键禁止")
 end if
End Sub
</script>
<script language="JAVASCRIPT">
<!-- Begin
var ap_name = navigator.appName;
var ap_vinfo = navigator.appVersion;
var ap_ver = parseFloat(ap_vinfo.substring(0,ap_vinfo.indexOf('(')));
var time_start = new Date();
var clock_start = time_start.getTime();
var dl_ok=false;
function init ()
{
if(ap_name=="Netscape" && ap_ver>=3.0)
dl_ok=true;
return true;
}
function get_time_spent ()
{
var time_now = new Date();
return((time_now.getTime() - clock_start)/1000);
}
function show_secs ()
{
var i_total_secs = Math.round(get_time_spent());
var i_secs_spent = i_total_secs % 60;
var i_mins_spent = Math.round((i_total_secs-30)/60);
var s_secs_spent = "" + ((i_secs_spent>9) ? i_secs_spent : "0" + i_secs_spent);
var s_mins_spent = "" + ((i_mins_spent>9) ? i_mins_spent : "0" + i_mins_spent);
document.fm0.time_spent.value = s_mins_spent + ":" + s_secs_spent;
window.setTimeout('show_secs()',1000);
}
init();
window.setTimeout('show_secs()',1);
//  End -->
</script>
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0" bgcolor="#000000" onload="initPlayer()">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" height="100%">
  <tr>
    <td width="100%" valign="top">
    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" height="100%">
      <tr>
        <td width="10" height="40">
        <img border="0" src="../img/play_vid/jinplay_1.gif" width="10" height="40"></td>
        <td height="40">
        <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
          <tr>
            <td background="../img/play_vid/jinplay_2.gif">
            欢迎您观看:<%=dddd%>(第<%=urlno%>集)</td>
            <td width="63">
            <img border="0" src="../img/play_vid/jinplay_4.gif" width="63" height="40"></td>
            <td width="79">
            <a href="javascript:this.location.reload()"><img border="0" src="../img/play_vid/jinplay_7.gif" width="79" height="40"></a></td>
            <td width="75">
            <a href="#" onclick="if (document.player.GetPlayState()==3) document.player.SetFullScreen()"><img border="0" src="../img/play_vid/jinplay_8.gif" width="75" height="40"></a></td>
          </tr>
        </table>
        </td>
        <td width="10" height="40">
        <img border="0" src="../img/play_vid/jinplay_10.gif" width="10" height="40"></td>
      </tr>
      <tr>
        <td width="10" valign="top" background="../img/play_vid/jinplay2.gif"> </td>
        <td bgcolor="#000000">
        <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; border: 1px solid #000000" bordercolor="#111111" width="100%" height="100%">
          <tr>
            <td width="100%" align="center">

<!-- ----swf代码开始------->
           <HTML xmlns:flashercn>
    <import namespace="flashercn" implementation="../js/Player.htc" />
    <flashercn:player src="<%=flvurl%>" width="560" height="400" />
    <xmp id="ViewFlash" style="display:none">
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="380" height="251" align="middle">
            <param name="movie" value="<%=flvurl%>"><param name="quality" value="high">
    </object>
    </xmp>
    <script language="javascript">
     try{parseFloat(window.navigator.userAgent.match(/MSIE ([\d\.]+)/)[1])<5.5?ViewFlash.outerHTML=ViewFlash.innerText:"" }
     catch(e){ViewFlash.outerHTML=ViewFlash.innerText}
     </script>
 </td>
          </tr>
        </table>
        </td>
        <td width="10" valign="top" background="../img/play_vid/jinplay1.gif"> </td>
      </tr>
      <tr>
        <td width="10" height="11" valign="top">
        <img border="0" src="../img/play_vid/jinplay_16.gif" width="10" height="11"></td>
        <td height="11" valign="top" background="../img/play_vid/jinplay_18.gif">
        <img border="0" src="../img/play_vid/jinplay_18.gif" width="10" height="11"></td>
        <td width="10" height="11" valign="top">
        <img border="0" src="../img/play_vid/jinplay_20.gif" width="10" height="11"></td>
      </tr>
    </table>
    </td>
  </tr>
</table>
<!-- -------swf播放器代码结束------ -->

 


2.在Admin/admin_video.asp中加入以下红色代码(有两处):

第一处:

<tr class=Hxcmsds><td width="17%" align="right">影片格式:</td><td width="83%"><select name="runsystem" size="1">
                    <option value="RM">RM 影视</option>
                    <option value="ASF">ASF 影视</option>
                    <option value="swf">swf影视</option>
                    <option value="其它">其它(FLV等格式)</option>
                  </select></td></tr>
<tr class=Hxcmsds><td width="17%" align="right">电影剧照:</td><td width="83%"><input type="text" name="images" class="textarea" size="40" value="img/nopic.gif"></td></tr>

 

 

第二处: <tr class=Hxcmsds><td width="17%" align="right">影片格式:</td><td width="83%"><select name="runsystem" size="1">
<option value="RM" <%if rs("runsystem")="RM" then response.write "selected" end if%>>RM 影视</option>
<option value="ASF" <%if rs("runsystem")="ASF" then response.write "selected" end if%>>ASF 影视</option>
<option value="swf" <%if rs("runsystem")="swf" then response.write "selected" end if%>>swf影视</option>
<option value="其它" <%if rs("runsystem")="其它" then response.write "selected" end if%>>其它影视</option>
                  </select></td></tr>
<tr class=Hxcmsds><td width="17%" align="right">电影剧照:</td><td width="83%"><input type="text" name="images" id="images" class="textarea" size="40" value="<%=rs("images")%>"></td></tr>

 

提交会员:admin | 浏览次数:
【 复制 】 【 打印 】

>>相关资讯:

上篇文章:HxCmsV8.0本站首页留言调控方法   下篇文章:大家来测试下你的QQ值多少钱!
查看网友评论 网友评论
以下网友评论只代表其个人观点,不代表悠久网的观点或立场
用户登陆

加载中……
相关文章
  • 没有相关文章
关于我们 | 广告合作 | 免责申明 | 程序帮助 | 网站地图 | 留言本站 | 友情连接 | 后台管理
Copyright © 2008 - 2009 HxCms.Net www.am873.com Inc. All Rights Reserved.
HxCms Ver8.0  鲁ICP备07004488号