بن غازي .: إدارة المنتدى :.
عدد الرسائل : 1822 العمر : 36 الدولة : المهنة : مزاجي : الاوسمهـ : السٌّمعَة : 0 نقاط : 378 تاريخ التسجيل : 16/08/2007
| موضوع: ساعة ترافق الماوس مع التاريخ الإثنين يناير 26, 2009 2:24 am | |
| <P> </P> <P> </P> <P> - الكود:
-
// Visit our site at [url=http://www.star28.com/]http://www.star28.com/[/url] for more code<BR>dCol='0000FF';//date colour.<BR>fCol='006600';//face colour.<BR>sCol='9900FF';//seconds colour.<BR>mCol='FF4500';//minutes colour.<BR>hCol='FF4500';//hours colour.<BR>ClockHeight=35;<BR>ClockWidth=35;<BR>ClockFromMouseY=0;<BR>ClockFromMouseX=100;<BR><BR>//Alter nothing below! Alignments will be lost!<BR>d=new Array("[url=http://www.star28.com%22,%22www.star28.com%22,%22www.star28.com%22,%22www.star28.com%22,%22www.star28.com%22,%22www.star28.com%22,%22www.star28.com/] WWW.STAR28.COM","WWW.STAR28.COM","WWW.STAR28.COM","WWW.STAR28.COM","WWW.STAR28.COM","WWW.STAR28.COM","WWW.STAR28.COM[/url]");<BR>m=new Array("JANUAR","FEBRUAR","MAERZ","APRIL","MAI","JUNI","JULI","AUGUST","SEPTEMBER","OKTOBER","NOVEMBER","DEZEMBER");<BR>date=new Date();<BR>day=date.getDate();<BR>year=date.getYear();<BR>if (year < 2000) year=year+1900;<BR>TodaysDate=" "+d[date.getDay()]+" "+day+" "+m[date.getMonth()]+" "+year;<BR>D=TodaysDate.split('');<BR>H='...';<BR>H=H.split('');<BR>M='....';<BR>M=M.split('');<BR>S='.....';<BR>S=S.split('');<BR>Face='1 2 3 4 5 6 7 8 9 10 11 12';<BR>font='Arial';<BR>size=1;<BR>speed=0.6;<BR>ns=(document.layers);<BR>ie=(document.all);<BR>Face=Face.split(' ');<BR>n=Face.length;<BR>a=size*10;<BR>ymouse=0;<BR>xmouse=0;<BR>scrll=0;<BR>props="[font=+font+][color=+fCol+][b]";<BR>props2="[font=+font+][color=+dCol+][b]";<BR>Split=360/n;<BR>Dsplit=360/D.length;<BR>HandHeight=ClockHeight/4.5<BR>HandWidth=ClockWidth/4.5<BR>HandY=-7;<BR>HandX=-2.5;<BR>scrll=0;<BR>step=0.06;<BR>currStep=0;<BR>y=new Array();x=new Array();Y=new Array();X=new Array();<BR>for (i=0; i < n; i++){y[i]=0;x[i]=0;Y[i]=0;X[i]=0}<BR>Dy=new Array();Dx=new Array();DY=new Array();DX=new Array();<BR>for (i=0; i < D.length; i++){Dy[i]=0;Dx[i]=0;DY[i]=0;DX[i]=0}<BR>if (ns){<BR>for (i=0; i < D.length; i++)<BR>document.write(''+props2+D[i]+'[/color][/font]');<BR>for (i=0; i < n; i++)<BR>document.write(''+props+Face[i]+'[/color][/font]');<BR>for (i=0; i < S.length; i++)<BR>document.write('[font=Arial][size=12][color=+sCol+][b]'+S[i]+'[/b][/color][/size][/font]');<BR>for (i=0; i < M.length; i++)<BR>document.write('[font=Arial][size=12][color=+mCol+][b]'+M[i]+'[/b][/color][/size][/font]');<BR>for (i=0; i < H.length; i++)<BR>document.write('[font=Arial][size=12][color=+hCol+][b]'+H[i]+'[/b][/color][/size][/font]');<BR>}<BR>if (ie){<BR>document.write('');<BR>for (i=0; i < D.length; i++)<BR>document.write('[center]'+props2+D[i]+'[/b]</font>[/center]<BR>');<BR>document.write('<BR><BR>');<BR>document.write('');<BR>for (i=0; i < n; i++)<BR>document.write('[center]'+props+Face[i]+'[/b]</font>[/center]<BR>');<BR>document.write('<BR><BR>');<BR>document.write('');<BR>for (i=0; i < H.length; i++)<BR>document.write('[center][color='+hCol+'][font=Arial][b]'+H[i]+'[/b][/font][/color][/center]<BR>');<BR>document.write('<BR><BR>');<BR>document.write('');<BR>for (i=0; i < M.length; i++)<BR>document.write('[center][color='+mCol+'][font=Arial][b]'+M[i]+'[/b][/font][/color][/center]<BR>');<BR>document.write('<BR><BR>')<BR>document.write('');<BR>for (i=0; i < S.length; i++)<BR>document.write('[center][color='+sCol+'][font=Arial][b]'+S[i]+'[/b][/font][/color][/center]<BR>');<BR>document.write('<BR><BR>')<BR>}<BR>(ns)?window.captureEvents(Event.MOUSEMOVE):0;<BR>function Mouse(evnt){<BR>ymouse = (ns)?evnt.pageY+ClockFromMouseY-(window.pageYOffset):event.y+ClockFromMouseY;<BR>xmouse = (ns)?evnt.pageX+ClockFromMouseX:event.x+ClockFromMouseX;<BR>}<BR>(ns)?window.onMouseMove=Mouse:document.onmousemove=Mouse;<BR>function ClockAndAssign(){<BR>time = new Date ();<BR>secs = time.getSeconds();<BR>sec = -1.57 + Math.PI * secs/30;<BR>mins = time.getMinutes();<BR>min = -1.57 + Math.PI * mins/30;<BR>hr = time.getHours();<BR>hrs = -1.575 + Math.PI * hr/6+Math.PI*parseInt(time.getMinutes())/360;<BR>if (ie){<BR>Od.style.top=window.document.body.scrollTop;<BR>Of.style.top=window.document.body.scrollTop;<BR>Oh.style.top=window.document.body.scrollTop;<BR>Om.style.top=window.document.body.scrollTop;<BR>Os.style.top=window.document.body.scrollTop;<BR>}<BR>for (i=0; i < n; i++){<BR> var F=(ns)?document.layers['nsFace'+i]:ieFace[i].style;<BR> F.top=y[i] + ClockHeight*Math.sin(-1.0471 + i*Split*Math.PI/180)+scrll;<BR> F.left=x[i] + ClockWidth*Math.cos(-1.0471 + i*Split*Math.PI/180);<BR> }<BR>for (i=0; i < H.length; i++){<BR> var HL=(ns)?document.layers['nsHours'+i]:ieHours[i].style;<BR> HL.top=y[i]+HandY+(i*HandHeight)*Math.sin(hrs)+scrll;<BR> HL.left=x[i]+HandX+(i*HandWidth)*Math.cos(hrs);<BR> }<BR>for (i=0; i < M.length; i++){<BR> var ML=(ns)?document.layers['nsMinutes'+i]:ieMinutes[i].style;<BR> ML.top=y[i]+HandY+(i*HandHeight)*Math.sin(min)+scrll;<BR> ML.left=x[i]+HandX+(i*HandWidth)*Math.cos(min);<BR> }<BR>for (i=0; i < S.length; i++){<BR> var SL=(ns)?document.layers['nsSeconds'+i]:ieSeconds[i].style;<BR> SL.top=y[i]+HandY+(i*HandHeight)*Math.sin(sec)+scrll;<BR> SL.left=x[i]+HandX+(i*HandWidth)*Math.cos(sec);<BR> }<BR>for (i=0; i < D.length; i++){<BR> var DL=(ns)?document.layers['nsDate'+i]:ieDate[i].style;<BR> DL.top=Dy[i] + ClockHeight*1.5*Math.sin(currStep+i*Dsplit*Math.PI/180)+scrll;<BR> DL.left=Dx[i] + ClockWidth*1.5*Math.cos(currStep+i*Dsplit*Math.PI/180);<BR> }<BR>currStep-=step;<BR>}<BR>function Delay(){<BR>scrll=(ns)?window.pageYOffset:0;<BR>Dy[0]=Math.round(DY[0]+=((ymouse)-DY[0])*speed);<BR>Dx[0]=Math.round(DX[0]+=((xmouse)-DX[0])*speed);<BR>for (i=1; i < D.length; i++){<BR>Dy[i]=Math.round(DY[i]+=(Dy[i-1]-DY[i])*speed);<BR>Dx[i]=Math.round(DX[i]+=(Dx[i-1]-DX[i])*speed);<BR>}<BR>y[0]=Math.round(Y[0]+=((ymouse)-Y[0])*speed);<BR>x[0]=Math.round(X[0]+=((xmouse)-X[0])*speed);<BR>for (i=1; i < n; i++){<BR>y[i]=Math.round(Y[i]+=(y[i-1]-Y[i])*speed);<BR>x[i]=Math.round(X[i]+=(x[i-1]-X[i])*speed);<BR>}<BR>ClockAndAssign();<BR>setTimeout('Delay()',20);<BR>}<BR>if (ns||ie)window.onload=Delay;<BR><BR> </P> | |
|