803ba243d3b276059313c63d.jpg

版权所有 : 天山寒雪 QQ:757015000 MSN: haijun.qin@hotmail.com

HTML 代码:
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>广告</title>
    <script language=javascript src="js/index.js" type="text/javascript"></script>
</head>
<body>
<form runat=server>
    <div>
      <script type="text/javascript">
     var focus_width=300;
     var focus_height=300;
     var text_height=0;
     var swf_height = focus_height+text_height
    
     var pics="images/Test-1.jpg|images/Test-2.jpg|images/Test-3.jpg|images/Test-4.jpg|images/Test-5.jpg|images/05.jpg";
     var links="index.aspx|index.aspx|index.aspx|index.aspx|index.aspx|index.aspx";
     var texts="|||||";
    document.write('<div id="ctlFlaHot"></div>');
    var swf = new SWFObject("swf/focus.swf", "ctlFlaHot", focus_width, focus_height, "7");
    swf.addParam("wmode", "opaque");
    swf.addParam("play", "false");
    swf.addParam("menu", "false");
    swf.addParam("FlashVars", 'pics='+pics+'&links='+escape(links)+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height);
    swf.write("ctlFlaHot");
</script>
    </div>
</form>
</body>
</html>
JS 代码:

//SWFObject
if(typeof deconcept=="undefined"){var deconcept=new Object();}
if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}
if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}
deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){if(!document.getElementById){return;}
this.DETECT_KEY=_b?_b:"detectflash";
this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);
this.params=new Object();
this.variables=new Object();
this.attributes=new Array();
if(_1){this.setAttribute("swf",_1);}
if(id){this.setAttribute("id",id);}
if(w){this.setAttribute("width",w);}
if(h){this.setAttribute("height",h);}
if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}
this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();
if(c){this.addParam("bgcolor",c);}
var q=_8?_8:"high";
this.addParam("quality",q);
this.setAttribute("useExpressInstall",_7);
this.setAttribute("doExpressInstall",false);
var _d=(_9)?_9:window.location;
this.setAttribute("xiRedirectUrl",_d);
this.setAttribute("redirectUrl","");
if(_a){this.setAttribute("redirectUrl",_a);}};
deconcept.SWFObject.prototype={setAttribute:function(_e,_f){
this.attributes[_e]=_f;
},getAttribute:function(_10){
return this.attributes[_10];
},addParam:function(_11,_12){
this.params[_11]=_12;
},getParams:function(){
return this.params;
},addVariable:function(_13,_14){
this.variables[_13]=_14;
},getVariable:function(_15){
return this.variables[_15];
},getVariables:function(){
return this.variables;
},getVariablePairs:function(){
var _16=new Array();
var key;
var _18=this.getVariables();
for(key in _18){_16.push(key+"="+_18[key]);}
return _16;},getSWFHTML:function(){var _19="";
if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){
if(this.getAttribute("doExpressInstall")){
this.addVariable("MMplayerType","PlugIn");}
_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";
_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";
var _1a=this.getParams();
for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}
var _1c=this.getVariablePairs().join("&");
if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";
}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}
_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";
_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";
var _1d=this.getParams();
for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}
var _1f=this.getVariablePairs().join("&");
if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}
return _19;
},write:function(_20){
if(this.getAttribute("useExpressInstall")){
var _21=new deconcept.PlayerVersion([6,0,65]);
if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){
this.setAttribute("doExpressInstall",true);
this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));
document.title=document.title.slice(0,47)+" - Flash Player Installation";
this.addVariable("MMdoctitle",document.title);}}
if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){
var n=(typeof _20=="string")?document.getElementById(_20):_20;
n.innerHTML=this.getSWFHTML();return true;
}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}
return false;}};
deconcept.SWFObjectUtil.getPlayerVersion=function(){
var _23=new deconcept.PlayerVersion([0,0,0]);
if(navigator.plugins&&navigator.mimeTypes.length){
var x=navigator.plugins["Shockwave Flash"];
if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}
}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}
catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}
catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}
catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}
return _23;};
deconcept.PlayerVersion=function(_27){
this.major=_27[0]!=null?parseInt(_27[0]):0;
this.minor=_27[1]!=null?parseInt(_27[1]):0;
this.rev=_27[2]!=null?parseInt(_27[2]):0;
};
deconcept.PlayerVersion.prototype.versionIsValid=function(fv){
if(this.major<fv.major){return false;}
if(this.major>fv.major){return true;}
if(this.minor<fv.minor){return false;}
if(this.minor>fv.minor){return true;}
if(this.rev<fv.rev){
return false;
}return true;};
deconcept.util={getRequestParameter:function(_29){
var q=document.location.search||document.location.hash;
if(q){var _2b=q.substring(1).split("&");
for(var i=0;i<_2b.length;i++){
if(_2b[i].substring(0,_2b[i].indexOf("="))==_29){
return _2b[i].substring((_2b[i].indexOf("=")+1));}}}
return "";}};
deconcept.SWFObjectUtil.cleanupSWFs=function(){if(window.opera||!document.all){return;}
var _2d=document.getElementsByTagName("OBJECT");
for(var i=0;i<_2d.length;i++){_2d[i].style.display="none";for(var x in _2d[i]){
if(typeof _2d[i][x]=="function"){_2d[i][x]=function(){};}}}};
deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};
__flash_savedUnloadHandler=function(){};
if(typeof window.οnunlοad=="function"){
var _30=window.onunload;
window.οnunlοad=function(){
deconcept.SWFObjectUtil.cleanupSWFs();_30();};
}else{window.οnunlοad=deconcept.SWFObjectUtil.cleanupSWFs;}};
if(typeof window.οnbefοreunlοad=="function"){
var oldBeforeUnload=window.onbeforeunload;
window.οnbefοreunlοad=function(){
deconcept.SWFObjectUtil.prepUnload();
oldBeforeUnload();};
}else{window.οnbefοreunlοad=deconcept.SWFObjectUtil.prepUnload;}
if(Array.prototype.push==null){
Array.prototype.push=function(_31){
this[this.length]=_31;
return this.length;};}
var getQueryParamValue=deconcept.util.getRequestParameter;
var FlashObject=deconcept.SWFObject;
var SWFObject=deconcept.SWFObject;
//SWFObject

=========

上面的代码我从哪里搞来的 ?

<form runat=server>
    <script type="text/javascript">
        imgUrl1="images/Test-1.jpg";
        imgtext1="蔬菜222222201"
        imgLink1=escape("index.aspx");
        imgUrl2="images/Test-2.jpg";
        imgtext2="蔬菜广告创意02"
        imgLink2=escape("index.aspx");
        imgUrl3="images/Test-3.jpg";
        imgtext3="蔬菜广告创意03"
        imgLink3=escape("index.aspx");
        imgUrl4="images/Test-4.jpg";
        imgtext4="蔬菜广告创意04"
        imgLink4=escape("index.aspx");
        imgUrl5="images/Test-5.jpg";
        imgtext5="蔬菜广告创意05"
        imgLink5=escape("index.aspx");

var focus_width=240
     var focus_height=200
     var text_height=18
     var swf_height = focus_height+text_height
    
     var pics=imgUrl1+"|"+imgUrl2+"|"+imgUrl3+"|"+imgUrl4+"|"+imgUrl5
     var links=imgLink1+"|"+imgLink2+"|"+imgLink3+"|"+imgLink4+"|"+imgLink5
     var texts=imgtext1+"|"+imgtext2+"|"+imgtext3+"|"+imgtext4+"|"+imgtext5

document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">');
     document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="focus.swf"><param name="quality" value="high"><param name="bgcolor" value="#F0F0F0">');
     document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
     document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
     document.write('<embed src="pixviewer.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#F0F0F0" quality="high" width="'+ focus_width +'" height="'+ focus_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
     document.write('</object>');

</script>
</form>

转载于:https://www.cnblogs.com/qinhaijun/archive/2011/08/26/2154436.html

仿九天音乐图片切换技术[二],兼容ie,ff相关推荐

  1. 分享113个图片切换JS特效,总有一款适合您

    分享113个图片切换JS特效,总有一款适合您 113个图片切换JS特效下载链接:https://pan.baidu.com/s/1NNSP-DMf3n0PeNbdNd8jEg?pwd=sfwr  提取 ...

  2. 摘自天极网的JS卡通图片切换代码

    代码简介: 来自经典论坛的一款仿天极网图片切换特效,含有详细的设置说明,使用起来比较简单.请在开始时设置图片目录.标题长度.图片切换的时间等,还可以设置Ad跟踪条的颜色,更多的自定义选项让它更能适合你 ...

  3. Javascript 仿Flash 图片切换 及 Flash 图片切换

    1. Javascript 仿Flash 图片切换 http://www.fansart.com/cweb/200669141456.asp <a target=_self href=" ...

  4. jQuery仿京东首页广告图片切换图片轮播

    1.效果图如下: 2.源码如下: <!DOCTYPE html> <html lang="en"> <head> <meta charse ...

  5. 防仿百度图片背景色php,基于jQuery实现仿百度首页换肤背景图片切换代码_jquery...

    不多说了,先给大家展示效果图,本文支持源码下载哦,需要的朋友可以直接下载使用,代码很简单哦- html代码: css代码: *{margin:0;padding:0} a{color:#fff; ma ...

  6. 基于jquery仿360网站图片选项卡切换代码

    今天给大家分享一款基于jquery仿360网站图片选项卡切换代码.这款实例适用浏览器:IE8.360.FireFox.Chrome.Safari.Opera.傲游.搜狗.世界之窗.效果图如下: 在线预 ...

  7. 10款js图片代码_图片滚动代码_图片切换代码_图片特效代码_图片轮播代码(二)

    js电影图片滑动放大展示特效 jQuery列表图片全图滚动预览 jQuery游戏图片手风琴切换代码 响应式图片文字横幅布局代码 swiper新闻大图滚动组合特效 swiper图文标题滚动轮播特效 js ...

  8. jQuery图片切换,图片幻灯片仿搜房网详情页图片相册切换

    jQuery图片切换,图片幻灯片仿搜房网详情页图片相册切换 1.可左右切换 2.可点击缩略图显示大图 3.缩略图多张滚动效果 直接贴代码 <div class="mod18" ...

  9. jQuery图片切换,轮播效果(仿迅雷首页FLASH效果)

    jQuery很不错的JS框架,现在已经更新到 1.2.6 了,添加了很多新特性,修正了大量的BUG. 今天,借助他的威力, 用js实现迅雷首页(http://xunlei.com/)FLASH轮换的效 ...

最新文章

  1. 【Java】阿里巴巴java开发手册总结(我能看懂的)
  2. 哪些软件问题也可导致硬盘录像机死机
  3. mysql root 无法建立数据库_MySQL - 在root用户下你跟我说无法建表!?
  4. C++ 虚函数和虚表
  5. 屌炸天,Oracle 发布了一个全栈虚拟机 GraalVM,支持 Python
  6. tdd java_适用于Idea的面向现代TDD的Java 8 JUnit测试模板(带有Mockito和AssertJ)
  7. 字符串数组的排序c++_Java——数组相关知识点及练习演绎
  8. 常用crc查表法_CRC校验码简介及CRC16的计算方法
  9. JS兼容性问题:window.locatin.href is not a function
  10. mysql数据库远程安装,Linux_15:解决远程安装数据库
  11. 蓝桥杯 入门训练 Fibonacci数列 JAVA
  12. pic系列单片机c语言编程与应用实例,PIC单片机C语言编程实例
  13. textpattern 在 nginx 上的 rewrite 规则
  14. CS5211替代LT7211B参数特性与优势|DP转LVDS方案
  15. 暂住证因为什么事件取消了_全面取消暂住证制度 一字之变逾2亿人受益
  16. C#,对接钉钉OA审批流程
  17. Smartbi的下载安装教程
  18. nginx 启动报错问题排查,和阿里云盾卸载方法
  19. android 日历翻页动画,Android开源库合集:轻松实现Android动态,炫目:日历效果...
  20. 买的香港云服务器怎么用?云服务器使用教程

热门文章

  1. OS X 使用技巧——轻松地调整窗口大小
  2. 5_Windows下利用批处理切换IP地址
  3. C#控件及常用属性整理
  4. 精通 WPF UI Virtualization
  5. java blockqueue_[Java基础] Java多线程-工具篇-BlockingQueue
  6. efk使用_如何使用EFK创建开源堆栈
  7. 55种数据可视化开源工具_通过开源工具增强学生能力的15种方法
  8. 前端:HTML/04/html颜色表示,计算机进制,锚点链接,计算机编码(字符集)
  9. es6 async函数的语法
  10. 视觉SLAM笔记(38) 3D-3D: ICP