Скрипты для украшения ваших форумов и сайтов. ( катит везде)
Скрипт украшения форума
Страница: 1
Сообщений 1 страница 2 из 2
Поделиться22009-07-20 10:37:45
Сиреневые бабочки летят из середины экрана
Код:
<Style Type="Text/CSS"> <!-- .Congrats { font-family: Impact; font-size: 26px; font-weight: normal; } .You { font-family: Impact; font-size: 26px; font-weight: normal; color: #FFFFFF; } .Close { font-family: Impact; font-size: 18px; font-weight: normal; } A:Link {color:#FFE466;text-decoration: none;} A:Visited {color:#FFE466;text-decoration: none;} A:Active {color:#FFE466;text-decoration: none;} A:Hover {color:#FFFFFF;text-decoration: underline;} --> </Style> <SCRIPT language=javascript> <!--// function right(e) { if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2)) return false; else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3)) { alert("Function disabled!"); return false;} return true;} //--> </SCRIPT> <Script Language="JavaScript1.2"> <!-- grphcs=new Array(5) Image0=new Image(); Image0.src=grphcs[0]="http://img395.imageshack.us/img395/2329/0043ot.gif" Image1=new Image(); Image1.src=grphcs[1]="http://img395.imageshack.us/img395/2329/0043ot.gif" Image2=new Image(); Image2.src=grphcs[2]="http://img395.imageshack.us/img395/2329/0043ot.gif" Image3=new Image(); Image3.src=grphcs[3]="http://img395.imageshack.us/img395/2329/0043ot.gif" Image4=new Image(); Image4.src=grphcs[4]="http://img395.imageshack.us/img395/2329/0043ot.gif" Amount=20; Ypos=new Array(); Xpos=new Array(); Zpos=new Array(); //SpeedX=new Array(); //SpeedY=new Array(); ScrXpos=new Array(); ScrYpos=new Array(); Speed=new Array(); Size=new Array(); Step=new Array(); ns=(document.layers)?1:0; ie=document.all&&navigator.userAgent.indexOf("Opera")==-1 if (ns){ for (i = 0; i < Amount; i++){ var P=Math.floor(Math.random()*grphcs.length); rndPic=grphcs[P]; document.write("<LAYER NAME='sn"+i+"' LEFT=0 TOP=0><img src="+rndPic+"></LAYER>"); } //end for } //end if else if (ie){ //IE document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">'); for (i = 0; i < Amount; i++){ document.write('<img id="si'+i+'" src="'+grphcs[Math.round((i+1)*(grphcs.length-1)/Amount)]+'"style="position:absolute;top:0px;left:0px">'); } document.write('</div></div>'); } if (ie||ns){ WinHeight=(ns)?window.innerHeight-20:window.document.body.clientHeight; WinWidth=(ns)?window.innerWidth-70:window.document.body.clientWidth; for (i=0; i < Amount; i++){ Speed[i]=(i+1)*6/Amount+4; //speed range from 4 to 10 Xpos[i] = (Math.random()*WinWidth-WinWidth/2)*(Amount-i/3)/Amount; Ypos[i] = (Math.random()*WinHeight-WinHeight/2)*(Amount-i/3)/Amount; Zpos[i] = Math.random()*900*(Amount-i/3)/Amount+100; } } function fly(){ var WinHeight=(ns)?window.innerHeight-20:window.document.body.clientHeight; var WinWidth=(ns)?window.innerWidth-70:window.document.body.clientWidth; var hscrll=(ns)?window.pageYOffset:document.body.scrollTop; for (i=0; i < Amount; i++){ Zpos[i]-=Speed[i]; if (ScrXpos[i]>WinWidth || ScrXpos[i]<0 || ScrYpos[i]>WinHeight || ScrYpos[i]<0 || Zpos[i]<=0) { Speed[i]=(i+1)*6/Amount+4; //speed range from 4 to 10 Xpos[i] = (Math.random()*WinWidth-WinWidth/2)*(Amount-i/3)/Amount; Ypos[i] = (Math.random()*WinHeight-WinHeight/2)*(Amount-i/3)/Amount; Zpos[i] = Math.random()*900*(Amount-i/3)/Amount+100; } ScrXpos[i]=Xpos[i]/Zpos[i]*100 + WinWidth/2; ScrYpos[i]=Ypos[i]/Zpos[i]*100 + WinHeight/2; if (ns){ document.layers['sn'+i].left=ScrXpos[i]; document.layers['sn'+i].top=ScrYpos[i]+hscrll; } else{ //IE eval("document.all.si"+i).style.left=ScrXpos[i]; eval("document.all.si"+i).style.top=ScrYpos[i]+hscrll; } } //end for setTimeout('fly()',20); } //end fly if (ie||ns) window.onload=fly //--> </Script>
Переливающиеся ссылки
Код:
<script language="Javascript"> var rate = 20; var obj; var act = 0; var elmH = 0; var elmS = 128; var elmV = 255; var clrOrg; var TimerID; if (navigator.appName.indexOf("Microsoft",0) != -1 && parseInt(navigator.appVersion) >= 4) { Browser = true; } else { Browser = false;} if (Browser) { document.onmouseover = doRainbowAnchor; document.onmouseout = stopRainbowAnchor;} function doRainbow(){ if (Browser && act != 1) { act = 1; obj = event.srcElement; clrOrg = obj.style.color; TimerID = setInterval("ChangeColor()",100);}} function stopRainbow(){ if (Browser && act != 0) { obj.style.color = clrOrg; clearInterval(TimerID); act = 0;}} function doRainbowAnchor(){ if (Browser && act != 1) { obj = event.srcElement; while (obj.tagName != "A" && obj.tagName != "BODY") { obj = obj.parentElement; if (obj.tagName == "A" || obj.tagName == "BODY") break;} if (obj.tagName == "A" && obj.href != "") { act = 1;//osw clrOrg = obj.style.color; TimerID = setInterval("ChangeColor()",100);}}} function stopRainbowAnchor(){ if (Browser && act != 0) { if (obj.tagName == "A") { obj.style.color = clrOrg; clearInterval(TimerID); act = 0;}}} function ChangeColor(){ obj.style.color = makeColor();} function makeColor(){ if (elmS == 0) { elmR = elmV; elmG = elmV; elmB = elmV;} else { t1 = elmV; t2 = (255 - elmS) * elmV / 255; t3 = elmH % 60; t3 = (t1 - t2) * t3 / 60; if (elmH < 60) { elmR = t1; elmB = t2; elmG = t2 + t3;} else if (elmH < 120) { elmG = t1; elmB = t2; elmR = t1 - t3;} else if (elmH < 180) { elmG = t1; elmR = t2; elmB = t2 + t3;} else if (elmH < 240) { elmB = t1; elmR = t2; elmG = t1 - t3;} else if (elmH < 300) { elmB = t1; elmG = t2; elmR = t2 + t3;} else if (elmH < 360) { elmR = t1; elmG = t2; elmB = t1 - t3;} else { elmR = 0; elmG = 0; elmB = 0;}} elmR = Math.floor(elmR);//fantasyflash.ru elmG = Math.floor(elmG); elmB = Math.floor(elmB); clrRGB = "#" + elmR.toString(16) + elmG.toString(16) + elmB.toString(16); elmH = elmH + rate; if (elmH >= 360) elmH = 0; return clrRGB;}</script> </body> </html><!-- ><!-- "><!-- "><!-- -->
Падают вот эти сердечки
Код:
<SCRIPT language=JavaScript> <!-- Image0 = new Image(); Image0.src = "http://fantasyflash.ru/anime/love/image/love36.gif"; Amount = 10; Ymouse = -50; Xmouse = -50; Ypos = new Array(); Xpos = new Array(); Speed = new Array(); rate = new Array(); grow = new Array(); Step = new Array(); Cstep = new Array(); nsSize = new Array(); ns = (document.layers)?1:0; (document.layers)?window.captureEvents(Event.MOUSEMOVE):0; function Mouse(evnt) { Ymouse=(document.layers)?evnt.pageY-20:event.y-20; Xmouse=(document.layers)?evnt.pageX:event.x; } (document.layers)?window.onMouseMove=Mouse:document.onmousemove=Mouse; for (i = 0; i < Amount; i++) { Ypos[i] = Ymouse; Xpos[i] = Xmouse; Speed[i] = Math.random()*4+1; Cstep[i] = 0;//osw Step[i] = Math.random()*0.1+0.05; grow[i] = 5; nsSize[i] = Math.random()*15+5; rate[i] = Math.random()*0.5+0.1; } if (ns) { for (i = 0; i < Amount; i++) { document.write("<LAYER NAME='sn"+i+"' LEFT=0 TOP=0><img src="+Image0.src+" name='N' width="+nsSize[i]+" height="+nsSize[i]+"></LAYER>"); } } else { document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">'); for (i = 0; i < Amount; i++) { document.write('<img id="si" src="'+Image0.src+'" style="position:absolute;top:0px;left:0px;filter:alpha(opacity=80)">'); } document.write('</div></div>'); } function Fly() { var hscrll = (document.layers)?window.pageYOffset:document.body.scrollTop; var wscrll = (document.layers)?window.pageXOffset:document.body.scrollLeft;//fantasyflash.ru for (i = 0; i < Amount; i++){ sy = Speed[i] * Math.sin(270 * Math.PI / 180); sx = Speed[i] * Math.cos(Cstep[i] * 4); Ypos[i] += sy; Xpos[i] += sx; if (Ypos[i] < -40) { Ypos[i] = Ymouse; Xpos[i] = Xmouse; Speed[i] = Math.random() * 6 + 4; grow[i] = 5;//osw nsSize[i] = Math.random() * 15 + 5; } if (ns) { document.layers['sn'+i].left = Xpos[i] + wscrll; document.layers['sn'+i].top = Ypos[i] + hscrll; } else { si[i].style.pixelLeft = Xpos[i] + wscrll; si[i].style.pixelTop = Ypos[i] + hscrll; si[i].style.width = grow[i]; si[i].style.height = grow[i]; } grow[i] += rate[i]; Cstep[i] += Step[i]; if (grow[i] > 15) grow[i] = 15; } setTimeout('Fly()', 10); } Fly(); --> </SCRIPT>
Страница: 1