仿百度新浪等流媒体flv随屏视频广告源码
时间:2009-08-05
来源:互联网
=700) window.open('http://images.phpfans.net/attach/images/20090805_da4e0ca3b7b6c20bfbae3wo9kY9w7UfG.jpg');" onload="if(this.offsetWidth>'700')this.width='700';if(this.offsetHeight>'700')this.height='700';" >
下面的压缩包是源代码需要的自己下 内附图片 flv播放器 演示等
代码如下:
<script language=\"javascript\" type=\"text/javascript\" src=\"images/videoad.js\"></script>
<DIV id=eMeng style=\" Z-INDEX:99999; LEFT: 0px; VISIBILITY: hidden; BORDER-BOTTOM: #000 2px solid; POSITION: absolute; TOP: 0px; BACKGROUND-COLOR: #000\">
<TABLE width=\"234\" height=\"160\" border=0 cellPadding=0 cellSpacing=0 bgColor=#000000 >
<TBODY>
<TR bgColor=#000>
<TD style=\"font-size: 12px; background-image: url('images/msgTopBg.gif'); color: #000\" width=5 height=24></TD>
<TD style=\"font-weight: normal; font-size: 12px; background-image: url('images/msgTopBg.gif'); color: #ffffff;padding-left:5px; padding-top: 4px\" vAlign=center width=\"1614\">MiningGo视频广告:</TD>
<TD style=\"background-image: url('images/msgTopBg.gif'); padding-right: 2px; padding-top: 2px\" vAlign=center align=right width=26><span title=关闭 style=\"CURSOR: hand;color:white;font-size:12px;font-weight:bold;margin-right:4px;\" onclick=closeDiv() >×</span><!--<IMG title=关闭 style=\"CURSOR: hand\" onclick=closeDiv() hspace=3 src=\"msgClose.jpg\">--></TD>
</TR>
<TR>
<TD colSpan=3 align=\"center\">
<object classid=\"clsid27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"230\" height=\"150\">
<param name=\"movie\" value=\"images/player.swf\">
<param name=\"quality\" value=\"high\">
<param name=\"allowFullScreen\" value=\"true\" />
<param name=\"FlashVars\" value=\"vcastr_file=http://www.mininggo.net/images/zhaoshang.flv&vcastr_title=MiningGo&BarColor=0xFFffff&BarPosition=1&IsShowBar=3&BarTransparent=10&LogoText=MiningGo.Net&IsAutoPlay=1\" />
<embed src=\"images/player.swf\" allowFullScreen=\"true\" FlashVars=\"vcastr_file=http://www.mininggo.net/images/zhaoshang.flv&vcastr_title=MiningGo&BarColor=0xFFffff&BarPosition=1&IsShowBar=3&BarTransparent=10&LogoText=MiningGo.Net&IsAutoPlay=1\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"230\" height=\"150\"></embed>
</object>
</TD>
</TR>
<tr>
<TD style=\"font-size: 12px; background-image: url('images/bomBg.gif');height:15px; line-height:15px; color: #ffffff;padding-top:2px;\" colSpan=3 width=240 height=15 align=\"center\">POWERED BY MiningGo</TD>
</tr>
</TBODY>
</TABLE>
</DIV>
js代码如下:
if (document.all){
window.attachEvent('onload',getMsg)
}
else{
window.addEventListener('load',getMsg,false);
}
window.onresize = resizeDiv;
window.onerror = function(){}
var divTop,divLeft,divWidth,divHeight,docHeight,docWidth,objTimer,i = 0;
function getMsg()
{
try{
divTop = parseInt(document.getElementById(\"eMeng\".style.top,10)
divLeft = parseInt(document.getElementById(\"eMeng\".style.left,10)
divHeight = parseInt(document.getElementById(\"eMeng\".offsetHeight,10)
divWidth = parseInt(document.getElementById(\"eMeng\".offsetWidth,10)
docWidth = document.documentElement.clientWidth;
docHeight = document.documentElement.clientHeight;
document.getElementById(\"eMeng\".style.top = parseInt(document.documentElement.scrollTop,10) + docHeight + 10;// divHeight
document.getElementById(\"eMeng\".style.left = parseInt(document.documentElement.scrollLeft,10) + docWidth - divWidth
document.getElementById(\"eMeng\".style.visibility=\"visible\"
objTimer = window.setInterval(\"moveDiv()\",10)
}
catch(e){}
}
function resizeDiv()
{
i+=1
//if(i>1300) closeDiv() //客户想不用自动消失由用户来自己关闭所以屏蔽这句
try{
divHeight = parseInt(document.getElementById(\"eMeng\".offsetHeight,10)
divWidth = parseInt(document.getElementById(\"eMeng\".offsetWidth,10)
docWidth = document.documentElement.clientWidth;
docHeight = document.documentElement.clientHeight;
document.getElementById(\"eMeng\".style.top = docHeight - divHeight + parseInt(document.documentElement.scrollTop,10);
document.getElementById(\"eMeng\".style.left = docWidth - divWidth + parseInt(document.documentElement.scrollLeft,10)
}
catch(e){}
}
function moveDiv()
{
try
{
if(parseInt(document.getElementById(\"eMeng\".style.top,10) <= (docHeight - divHeight + parseInt(document.documentElement.scrollTop,10)))
{
window.clearInterval(objTimer)
objTimer = window.setInterval(\"resizeDiv()\",1)
}
divTop = parseInt(document.getElementById(\"eMeng\".style.top,10)
document.getElementById(\"eMeng\".style.top = divTop - 1
}
catch(e){}
}
function closeDiv()
{
document.getElementById('eMeng').innerHTML='';
document.getElementById('eMeng').style.visibility='hidden';
if(objTimer) window.clearInterval(objTimer)
}
作者: php学习 发布时间: 2009-08-05

作者: fangyuan312 发布时间: 2009-09-17
学习。。。。。。。。。
作者: daguohui 发布时间: 2009-09-17
谢谢分享
作者: lzwomen 发布时间: 2010-01-08
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28