可爱老人网

 找回密码
 注册会员
搜索
查看: 1191|回复: 2

试代码帖

[复制链接]
发表于 2013-9-14 01:37 | 显示全部楼层 |阅读模式
本帖最后由 腊月冬寒 于 2013-9-14 01:55 编辑

http://txt.meqzone.com/up5/1379093713_988908769.txt
日前在网络见一音画,点击后两张图片有动感,像有遮照,
我就用底图一张图片,在上面的一张还是原图但ps了一人,
像在作画。
可以随意找两张图。



 楼主| 发表于 2013-9-14 01:42 | 显示全部楼层
DIV style="LEFT: -0px; WIDTH: 1000px; POSITION: relative; TOP: -0px">
<TABLE style="WIDTH: 1000px; HEIGHT: 500px" borderColor=#008844 height=500 cellPadding=2
background=
http://ww2.sinaimg.cn/mw1024/6c0569a3jw1e8kxf8og5hg20rs0dwwmg.gif border=0
<TABLE style="WIDTH: 1000px; HEIGHT: 500px" borderColor=#008844 height=500 cellPadding=2
<TBODY>
<TR>
<TD><meta http-equiv="imagetoolbar" content="no">
<style type="text/css">

img {position:absolute;left:-10000;}
.spd {border:#025325 solid 1px;overflow:hidden;z-index:0;font-size:1px;position:absolute;}
</style>
<script type="text/javascript"><!--
/////////////
var NX = 9;
var NY = 7;
/////////////
var IM = 0;
var ix = 0;
var ih = 0;
var nx = 0;
var ny = 0;
var Nx = 0;
var Ny = 0;
var C  = 0;
var xm = 0;
var ym = 0;
var ion = new Array();
for(var i=0;i<NX;i++)ion = new Array();
function CObj(x,y){
this.obj = document.createElement("span");
this.obj.className = "spd";
this.img = document.createElement("img");
this.img.src = IM.src;
this.obj.appendChild(this.img);
document.getElementById("SPAN").appendChild(this.obj);
this.xc  = x/NX;
this.yc  = y/NY;
this.x   = x;
this.y   = y;
this.L   = 0;
this.T   = 0;
this.K   = 0;
this.Z   = Nx;
this.SI  = 0;
this.click = function (){
  with (this) {
   Z=Nx;
   if(K>20)K=0;
   if(SI==0){
    SI=1;
    ion[x][y].clock();
   }
  }
}
this.clock = function (){
  with (this) {
   M = Math.round(Nx - Z * Math.sin(K * .1));
   H = Math.round(M * Ny / Nx);
   K++;
   with(obj.style){
    left   =  Nx * .5 + L - M * .5-(iw*.5);
    top    = Ny * .5 + T - H * .5-(ih*.5);
    width  = M + 1;
       height = H + 1;
    zIndex = Math.round(10000 - (Z*10)+x);
   }
   with(img.style){
    left   = -L+M*xc-Nx*xc;
    top    = -T+H*yc-Ny*yc;
   }
   if(K==7){
    if(x<NX-1)ion[x+1][y].click();
    if(x>0)ion[x-1][y].click();
    if(y<NY-1)ion[x][y+1].click();
    if(y>0)ion[x][y-1].click();
   }
   if(K==10){
    if(x>0&&y>0)ion[x-1][y-1].click();
    if(x<NX-1&&y<NY-1)ion[x+1][y+1].click();
    if(x>0&&y<NY-1)ion[x-1][y+1].click();
    if(x<NX-1&&y>0)ion[x+1][y-1].click();
   }
   if(Z<=0){
    SI = 0;
    Z = Nx;
    K = 0;
   } else {
    Z-=.25;
    setTimeout("ion["+x+"]["+y+"].clock()",16);
   }
  }
}
this.DOOT = function (){
  with(this){
   L  = Math.round(x*Nx);
   T  = Math.round(y*Ny);
   with(obj.style){
    left   = Math.round((-iw*.5)+L);
    top    = Math.round((-ih*.5)+T);
    width  = Math.round(Nx + 1);
    height = Math.round(Ny + 1);
   }
   with(img.style){
    left   = -L;
    top    = -T;
   }
  }
}
}
document.onclick = function(){
x = Math.ceil(((xm-(nx*.5)+(iw*.5))/Nx))-1;
y = Math.ceil(((ym-(ny*.5)+(ih*.5))/Ny))-1;
if(x>=0&&x<NX&&y>=0&&y<NY){
  ion[x][y].Z=Nx;
  ion[x][y].click();
}
}
function resize(){
nx = document.body.clientWidth;
ny = document.body.clientHeight;
}
onresize = resize;
document.onmousemove = function(e){
if (window.event) e = window.event;
xm = (e.x || e.clientX);
ym = (e.y || e.clientY);
}
onload = function() {
resize();
IM = document.getElementById("doot");
SP =  document.getElementById("SPAN");
iw = IM.width;
ih = IM.height;
Nx = Math.round(iw / NX);
Ny = Math.round(ih / NY);
for(var i=0;i<NX;i++){
  for(var j=0;j<NY;j++){
   ion[j] = new CObj(i,j);
   ion[j].DOOT();
  }
}
}
//-->
</script>
</head>
<body>
<div id="SPAN" style="position:absolute;left:50.1%;top:50%"></div>
<img id="doot" src="http://ww4.sinaimg.cn/mw1024/6c0569a3jw1e8kxfldonrg20rs0dw46e.gif">
</body>



<embed src=http://www.xzjdsb.com/play/hetangyuese.mp3?& type=audio/x-pn-realaudio-plugin controls=controlpanel,statusbar autostart=true loop=true hidden=true width=0 height=0>
<FONT  style="POSITION: absolute; WIDTH: 400px; TOP: 480px; LEFT: 710px"  style="FILTER: shadow(color=#DA70D6); LINE-HEIGHT: 150%; WIDTH: 100%; FONT-FAMILY: DFYaSongW9-GB; COLOR: white; FONT-SIZE: 11pt"><B>某某音画/素材/网络
<BR>

</html>
杭州西湖 该用户已被删除
发表于 2013-9-14 05:24 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
        
下一页 发布主题 快速回复

手机版|公众号|小黑屋|可爱老人网

GMT+8, 2024-11-18 13:34

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表