...
Скрипты
Сообщений 1 страница 8 из 8
Поделиться22009-10-17 15:14:08
Подимающиеся Эффекты (это когда что-то снизу летит) очень красиво (ну типо снежинок тока летит снизу вверх)
Розовые Розочки Летят Вверх
<a href="http://sababa.webhost.ru" target=_blank> <img src="http://sababa.webhost.ru/image/BANNIER.gif" border="0"alt=" Cкрипты, шаблоны, курсоры, часы и знаменитости." width=125height=105></a></center> </SCRIPT> </STYLE> <script language="JavaScript1.2"> <!-- Begin var no = 15; // image number or falling rate var speed = 4; // the lower the number the faster the image moves var snow = new Array(); snow[0] = "http://img152.imageshack.us/img152/9522/neige23hg.gif" snow[1] = "http://img152.imageshack.us/img152/9522/neige23hg.gif" snow[2] = "http://img152.imageshack.us/img152/9522/neige23hg.gif" var ns4up = (document.layers) ? 1 : 0; // browser sniffer var ie4up = (document.all) ? 1 : 0; var ns6up = (document.getElementById&&!document.all) ? 1 : 0; var dx, xp, yp; // coordinate and position variables var am, stx, sty; // amplitude and step variables var i, doc_width = 800, doc_height = 1800; if (ns4up||ns6up) { doc_width = self.innerWidth; doc_height = self.innerHeight; } else if (ie4up) { doc_width = document.body.clientWidth; doc_height = document.body.clientHeight; } dx = new Array(); xp = new Array(); yp = new Array(); am = new Array(); stx = new Array(); sty = new Array(); j = 0; for (i = 0; i < no; ++ i) { dx[i] = 0; // set coordinate variables xp[i] = Math.random()*(doc_width-50); // set position variables yp[i] = Math.random()*doc_height; am[i] = Math.random()*20; // set amplitude variables stx[i] = 0.02 + Math.random()/10; // set step variables sty[i] = 0.7 + Math.random(); // set step variables if (ns4up) { // set layers if (i == 0) { document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><img src=\""+ snow[j] + "\" border=\"0\"></layer>"); } else { document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><img src=\""+ snow[j] + "\" border=\"0\"></layer>"); } } else if (ie4up||ns6up) { if (i == 0) { document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"VISIBILITY: visible; TOP: 15px; LEFT: 15px; width:1;\"><img src=\"" + snow[j] + "\" border=\"0\"></div>"); } else { document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"VISIBILITY: visible; TOP: 15px; LEFT: 15px; width:1;\"><img src=\"" + snow[j] + "\" border=\"0\"></div>"); } } if (j == (snow.length-1)) { j = 0; } else { j += 1; } } function snowNS() { // Netscape main animation function for (i = 0; i < no; ++ i) { // iterate for every dot yp[i] -= sty[i]; if (yp[i] < -50) { xp[i] = Math.random()*(doc_width-am[i]-30); yp[i] = doc_height; stx[i] = 0.02 + Math.random()/10; sty[i] = 0.7 + Math.random(); doc_width = self.innerWidth; doc_height = self.innerHeight; } dx[i] += stx[i]; document.layers["dot"+i].top = yp[i]+pageYOffset; document.layers["dot"+i].left = xp[i] + am[i]*Math.sin(dx[i]); } setTimeout("snowNS()", speed); } function snowIE_NS6() { // IE main animation function for (i = 0; i < no; ++ i) { // iterate for every dot yp[i] -= sty[i]; if (yp[i] < -50) { xp[i] = Math.random()*(doc_width-am[i]-30); yp[i] = doc_height; stx[i] = 0.02 + Math.random()/10; sty[i] = 0.7 + Math.random(); doc_width = ns6up?window.innerWidth-5:document.body.clientWidth; doc_height = ns6up?window.innerHeight-5:document.body.clientHeight; } dx[i] += stx[i]; if (ie4up){ document.all["dot"+i].style.pixelTop = yp[i]+document.body.scrollTop; document.all["dot"+i].style.pixelLeft = xp[i] + am[i]*Math.sin(dx[i]); } else if (ns6up){ document.getElementById("dot"+i).style.top=yp[i]+pageYOffset; document.getElementById("dot"+i).style.left=xp[i] + am[i]*Math.sin(dx[i]); } } setTimeout("snowIE_NS6()", speed); } if (ns4up) { snowNS(); } else if (ie4up||ns6up) { snowIE_NS6(); } // End --> </script>
Поделиться32009-10-17 15:14:46
Зеленые Сердечки
<a href="http://sababa.webhost.ru" target=_blank> <img src="http://sababa.webhost.ru/image/BANNIER.gif" border="0"alt=" Cкрипты, шаблоны, курсоры, часы и знаменитости." width=125height=105></a></center> </SCRIPT> </STYLE> <script language="JavaScript1.2"> <!-- Begin var no = 15; // image number or falling rate var speed = 4; // the lower the number the faster the image moves var snow = new Array(); snow[0] = "http://img151.imageshack.us/img151/325/on181jr.gif" snow[1] = "http://img151.imageshack.us/img151/325/on181jr.gif" snow[2] = "http://img151.imageshack.us/img151/325/on181jr.gif" var ns4up = (document.layers) ? 1 : 0; // browser sniffer var ie4up = (document.all) ? 1 : 0; var ns6up = (document.getElementById&&!document.all) ? 1 : 0; var dx, xp, yp; // coordinate and position variables var am, stx, sty; // amplitude and step variables var i, doc_width = 800, doc_height = 1800; if (ns4up||ns6up) { doc_width = self.innerWidth; doc_height = self.innerHeight; } else if (ie4up) { doc_width = document.body.clientWidth; doc_height = document.body.clientHeight; } dx = new Array(); xp = new Array(); yp = new Array(); am = new Array(); stx = new Array(); sty = new Array(); j = 0; for (i = 0; i < no; ++ i) { dx[i] = 0; // set coordinate variables xp[i] = Math.random()*(doc_width-50); // set position variables yp[i] = Math.random()*doc_height; am[i] = Math.random()*20; // set amplitude variables stx[i] = 0.02 + Math.random()/10; // set step variables sty[i] = 0.7 + Math.random(); // set step variables if (ns4up) { // set layers if (i == 0) { document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><img src=\""+ snow[j] + "\" border=\"0\"></layer>"); } else { document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><img src=\""+ snow[j] + "\" border=\"0\"></layer>"); } } else if (ie4up||ns6up) { if (i == 0) { document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"VISIBILITY: visible; TOP: 15px; LEFT: 15px; width:1;\"><img src=\"" + snow[j] + "\" border=\"0\"></div>"); } else { document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"VISIBILITY: visible; TOP: 15px; LEFT: 15px; width:1;\"><img src=\"" + snow[j] + "\" border=\"0\"></div>"); } } if (j == (snow.length-1)) { j = 0; } else { j += 1; } } function snowNS() { // Netscape main animation function for (i = 0; i < no; ++ i) { // iterate for every dot yp[i] -= sty[i]; if (yp[i] < -50) { xp[i] = Math.random()*(doc_width-am[i]-30); yp[i] = doc_height; stx[i] = 0.02 + Math.random()/10; sty[i] = 0.7 + Math.random(); doc_width = self.innerWidth; doc_height = self.innerHeight; } dx[i] += stx[i]; document.layers["dot"+i].top = yp[i]+pageYOffset; document.layers["dot"+i].left = xp[i] + am[i]*Math.sin(dx[i]); } setTimeout("snowNS()", speed); } function snowIE_NS6() { // IE main animation function for (i = 0; i < no; ++ i) { // iterate for every dot yp[i] -= sty[i]; if (yp[i] < -50) { xp[i] = Math.random()*(doc_width-am[i]-30); yp[i] = doc_height; stx[i] = 0.02 + Math.random()/10; sty[i] = 0.7 + Math.random(); doc_width = ns6up?window.innerWidth-5:document.body.clientWidth; doc_height = ns6up?window.innerHeight-5:document.body.clientHeight; } dx[i] += stx[i]; if (ie4up){ document.all["dot"+i].style.pixelTop = yp[i]+document.body.scrollTop; document.all["dot"+i].style.pixelLeft = xp[i] + am[i]*Math.sin(dx[i]); } else if (ns6up){ document.getElementById("dot"+i).style.top=yp[i]+pageYOffset; document.getElementById("dot"+i).style.left=xp[i] + am[i]*Math.sin(dx[i]); } } setTimeout("snowIE_NS6()", speed); } if (ns4up) { snowNS(); } else if (ie4up||ns6up) { snowIE_NS6(); } // End --> </script>
Поделиться42009-10-18 15:11:33
Текст 3 D вокруг курсора
[hide=2]<script language="JavaScript"> if (document.all) { yourLogo = "* Скрипты на * Strecoza.net "; logoFont = " verdana"; logoColor = " #3E6786"; yourLogo = yourLogo.split(''); L = yourLogo.length; TrigSplit = 360 / L; Sz = new Array() logoWidth = 70; logoHeight = -30; ypos = 0; xpos = 0; step = 0.04; currStep = 0; document.write('<div id="outer" style="position:absolute;top:0px;left:0px "><div style="position:relative">'); for (i = 0; i < L; i++) { document.write('<div id="ie" style="position:absolute;top:0px;left:0px ;' +'width:10px;height:10px;font-family: '+logoFont+'; font-size:12px;' +'color:'+logoColor+'; text-align:cent er">'+yourLogo[i]+'</div>'); } document.write('</div></div>'); function Mouse() { ypos = event.y; xpos = event.x - 3; } document.onmousemove=Mouse; function animateLogo() { outer.style.pixelTop = document.body.scrollTop; for (i = 0; i < L; i++) { ie[i].style.top = ypos + logoHeight * Math.sin(currStep + i * TrigSplit * Math.PI / 180); ie[i].style.left = xpos + logoWidth * Math.cos(currStep + i * TrigSplit * Math.PI / 180); Sz[i] = ie[i].style.pixelTop - ypos; if (Sz[i] < 5) Sz[i] = 3; ie[i].style.fontSize = Sz[i] / 1.7; } currStep -= step; setTimeout('animateLogo()', 10); } window.onload = animateLogo; } // End --> </script>[/hide]
Вылетающие змейки из курсора
[hide=2]<script language=JavaScript> <!-- Trio 3 Script by kurt.grigg@virgin.net //Choose colours and size of effect !! var a_Colour='3E6786'; var b_Colour='759FBF'; var c_Colour='C9DAE7'; var Size=60; //Alter nothing below !! var YDummy=new Array(),XDummy=new Array(),xpos=0,ypos=0,ThisStep=0;step=0.6; if (document.layers){ window.captureEvents(Event.MOUSEMOVE); function nsMouse(evnt){ xpos = window.pageYOffset+evnt.pageX+6; ypos = window.pageYOffset+evnt.pageY+16; } window.onMouseMove = nsMouse; } else if (document.all) { function ieMouse(){ xpos = document.body.scrollLeft+event.x+6; ypos = document.body.scrollTop+event.y+16; } document.onmousemove = ieMouse; } function swirl(){ for (i = 0; i < 3; i++) { YDummy[i]=ypos+Size*Math.sin((1*Math.sin((ThisStep)/10))+i*2)*Math.sin((ThisStep)/4); XDummy[i]=xpos+Size*Math.cos((1*Math.sin((ThisStep)/10))+i*2)*Math.sin((ThisStep)/4); } ThisStep+=step; setTimeout('swirl()',10); } var amount=10; if (document.layers){ for (i = 0; i < amount; i++) { document.write('<layer name=nsa'+i+' top=0 left=0 width='+i/2+' height='+i/2+' bgcolor='+a_Colour+'></layer>'); document.write('<layer name=nsb'+i+' top=0 left=0 width='+i/2+' height='+i/2+' bgcolor='+b_Colour+'></layer>'); document.write('<layer name=nsc'+i+' top=0 left=0 width='+i/2+' height='+i/2+' bgcolor='+c_Colour+'></layer>'); } } else if (document.all){ document.write('<div id="ODiv" style="position:absolute;top:0px;left:0px">' +'<div id="IDiv" style="position:relative">'); for (i = 0; i < amount; i++) { document.write('<div id=x style="position:absolute;top:0px;left:0px;width:'+i/2+';height:'+i/2+';background:'+a_Colour+';font-size:'+i/2+'"></div>'); document.write('<div id=y style="position:absolute;top:0px;left:0px;width:'+i/2+';height:'+i/2+';background:'+b_Colour+';font-size:'+i/2+'"></div>'); document.write('<div id=z style="position:absolute;top:0px;left:0px;width:'+i/2+';height:'+i/2+';background:'+c_Colour+';font-size:'+i/2+'"></div>'); } document.write('</div></div>'); } function prepos(){ var ntscp=document.layers; var msie=document.all; if (document.layers){ for (i = 0; i < amount; i++) { if (i < amount-1) { ntscp['nsa'+i].top=ntscp['nsa'+(i+1)].top;ntscp['nsa'+i].left=ntscp['nsa'+(i+1)].left; ntscp['nsb'+i].top=ntscp['nsb'+(i+1)].top;ntscp['nsb'+i].left=ntscp['nsb'+(i+1)].left; ntscp['nsc'+i].top=ntscp['nsc'+(i+1)].top;ntscp['nsc'+i].left=ntscp['nsc'+(i+1)].left; } else { ntscp['nsa'+i].top=YDummy[0];ntscp['nsa'+i].left=XDummy[0]; ntscp['nsb'+i].top=YDummy[1];ntscp['nsb'+i].left=XDummy[1]; ntscp['nsc'+i].top=YDummy[2];ntscp['nsc'+i].left=XDummy[2]; } } } else if (document.all){ for (i = 0; i < amount; i++) { if (i < amount-1) { msie.x[i].style.top=msie.x[i+1].style.top;msie.x[i].style.left=msie.x[i+1].style.left; msie.y[i].style.top=msie.y[i+1].style.top;msie.y[i].style.left=msie.y[i+1].style.left; msie.z[i].style.top=msie.z[i+1].style.top;msie.z[i].style.left=msie.z[i+1].style.left; } else { msie.x[i].style.top=YDummy[0];msie.x[i].style.left=XDummy[0]; msie.y[i].style.top=YDummy[1];msie.y[i].style.left=XDummy[1]; msie.z[i].style.top=YDummy[2];msie.z[i].style.left=XDummy[2]; } } } setTimeout("prepos()",10); } function Start(){ swirl(),prepos() } window.onload=Start; // --> </script>[/hide]
Фигурка возле курсора
[hide=2]<script type="text/javascript"> var trailimage=["http://strecoza.net/mybanner/123.gif", 40, 40] //image path, plus width and height var offsetfrommouse=[10,-20] //image x,y offsets from cursor position in pixels. Enter 0,0 for no offset var displayduration=0 //duration in seconds image should remain visible. 0 for always. if (document.getElementById || document.all) document.write('<div id="trailimageid" style="position:absolute;visibility:visible;left:0px;top:0px;width:1px;height:1px"><img src="'+trailimage[0]+'" border="0" width="'+trailimage[1]+'px" height="'+trailimage[2]+'px"></div>') function gettrailobj(){ if (document.getElementById) return document.getElementById("trailimageid").style else if (document.all) return document.all.trailimagid.style } function truebody(){ return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body } function hidetrail(){ gettrailobj().visibility="hidden" document.onmousemove="" } function followmouse(e){ var xcoord=offsetfrommouse[0] var ycoord=offsetfrommouse[1] if (typeof e != "undefined"){ xcoord+=e.pageX ycoord+=e.pageY } else if (typeof window.event !="undefined"){ xcoord+=truebody().scrollLeft+event.clientX ycoord+=truebody().scrollTop+event.clientY } var docwidth=document.all? truebody().scrollLeft+truebody().clientWidth : pageXOffset+window.innerWidth-15 var docheight=document.all? Math.max(truebody().scrollHeight, truebody().clientHeight) : Math.max(document.body.offsetHeight, window.innerHeight) if (xcoord+trailimage[1]+3>docwidth || ycoord+trailimage[2]> docheight) gettrailobj().display="none" else gettrailobj().display="" gettrailobj().left=xcoord+"px" gettrailobj().top=ycoord+"px" } document.onmousemove=followmouse d if (displayduration>0) setTimeout("hidetrail()", displayduration*1000) </script>[/hide]
Мерцающие звезды
[hide=2]; } h3 { color:#993333; font-family:"Comic Sans MS",Helvetica; } .kisser { position:absolute; top:0; left:0; visibility:hidden; } --> </style> <script language="JavaScript1.2" type="text/JavaScript"> <!-- cloak kisserCount = 15 //maximum number of images on screen at one time curKisser = 0 //the last image DIV to be displayed (used for timer) kissDelay = 1000 //duration images stay on screen (in milliseconds) kissSpacer = 50 //distance to move mouse b4 next heart appears theimage = "http://www.strecoza.net/mybanner/mini_gif04.gif" //the 1st image to be displayed theimage2 = "http://www.strecoza.net/mybanner/mini_gif04.gif" //the 2nd image to be displayed //Browser checking and syntax variables var docLayers = (document.layers) ? true:false; var docId = (document.getElementById) ? true:false; var docAll = (document.all) ? true:false; var docbitK = (docLayers) ? "document.layers['":(docId) ? "document.getElementById('":(docAll) ? "document.all['":"document." var docbitendK = (docLayers) ? "']":(docId) ? "')":(docAll) ? "']":"" var stylebitK = (docLayers) ? "":".style" var showbitK = (docLayers) ? "show":"visible" var hidebitK = (docLayers) ? "hide":"hidden" var ns6=document.getElementById&&!document.all //Variables used in script var posX, posY, lastX, lastY, kisserCount, curKisser, kissDelay, kissSpacer, theimage lastX = 0 lastY = 0 //Collection of functions to get mouse position and place the images function doKisser(e) { posX = getMouseXPos(e) posY = getMouseYPos(e) if (posX>(lastX+kissSpacer)||posX<(lastX-kissSpacer)||posY>(lastY+kissSpacer)||posY<(lastY-kissSpacer)) { showKisser(posX,posY) lastX = posX lastY = posY } } // Get the horizontal position of the mouse function getMouseXPos(e) { if (document.layers||ns6) { return parseInt(e.pageX+10) } else { return (parseInt(event.clientX+10) + parseInt(document.body.scrollLeft)) } } // Get the vartical position of the mouse function getMouseYPos(e) { if (document.layers||ns6) { return parseInt(e.pageY) } else { return (parseInt(event.clientY) + parseInt(document.body.scrollTop)) } } //Place the image and start timer so that it disappears after a period of time function showKisser(x,y) { var processedx=ns6? Math.min(x,window.innerWidth-75) : docAll? Math.min(x,document.body.clientWidth-55) : x if (curKisser >= kisserCount) {curKisser = 0} eval(docbitK + "kisser" + curKisser + docbitendK + stylebitK + ".left = " + processedx) eval(docbitK + "kisser" + curKisser + docbitendK + stylebitK + ".top = " + y) eval(docbitK + "kisser" + curKisser + docbitendK + stylebitK + ".visibility = '" + showbitK + "'") if (eval("typeof(kissDelay" + curKisser + ")")=="number") { eval("clearTimeout(kissDelay" + curKisser + ")") } eval("kissDelay" + curKisser + " = setTimeout('hideKisser(" + curKisser + ")',kissDelay)") curKisser += 1 } //Make the image disappear function hideKisser(knum) { eval(docbitK + "kisser" + knum + docbitendK + stylebitK + ".visibility = '" + hidebitK + "'") } function kissbegin(){ //Let the browser know when the mouse moves if (docLayers) { document.captureEvents(Event.MOUSEMOVE) document.onMouseMove = doKisser } else { document.onmousemove = doKisser } } window.onload=kissbegin // decloak -->strecoza.net </script> <script language="JavaScript" type="text/JavaScript"> <!-- cloak // Add all DIV's of hearts if (document.all||document.getElementById||document.layers){ for (k=0;k<kisserCount;k=k+2) { document.write('<div id="kisser' + k + '" class="kisser"><img src="' + theimage + '" alt="" border="0"></div>\n') document.write('<div id="kisser' + (k+1) + '" class="kisser"><img src="' + theimage2 + '" alt="" border="0"></div>\n') } } // decloak --> </script>[/hide]
Летающие бабочки
[hide=2]function init(){ wind_w=getwindowwidth(); wind_h=getwindowheight(); for(i=0; i<floatimages.length; i++){ IDs[i]=getid('pic'+i); if(NS4){ IDs[i].W=IDs[i].document.images["p"+i].width; IDs[i].H=IDs[i].document.images["p"+i].height; } if(NS6 || IE4){ IDs[i].W=document.images["p"+i].width; IDs[i].H=document.images["p"+i].height; } getnewprops(i); moveidto(i , Math.floor(Math.random()*(wind_w-IDs[i].W)), Math.floor(Math.random()*(wind_h-IDs[i].H))); if(NS4)IDs[i].visibility = "show"; if(IE4 || NS6)IDs[i].style.visibility = "visible"; startfly=setInterval('moveimage('+i+')',Math.floor(Math.random()*100)+100); }} function hidebutterfly(){ for(i=0; i<floatimages.length; i++){ if (IE4) eval("document.all.pic"+i+".style.visibility='hidden'") else if (NS6) document.getElementById("pic"+i).style.visibility='hidden' else if (NS4) eval("document.pic"+i+".visibility='hide'") clearInterval(startfly) } } if (NS4||NS6||IE4){ window.onload=init; window.onresize=function(){ wind_w=getwindowwidth(); wind_h=getwindowheight(); } } </script>[/hide] Падающие сердечки [hide=2]<SCRIPT language=Javascript1.2> <!-- // Original: Altan - http://www.altan.hr/snow --> // Traduit en francais (le plus important) par Le Webmestre www.le-webmestre.net info@le-webmestre.net // Script trouve sur Le Webmestre www.le-webmestre.net info@le-webmestre.net // Retrouvez des centaines de scripts et bien plus... // Nombre de flocons var no = 10; // Vitesse, plus le nombre est petit, plus la vitesse augmente var speed = 30; // URL de l'image var snowflake = "http://www.strecoza.net/G-pynt/h1000000.gif"; ////////////////////////////////////////////////////////////////////////////// var ns4up = (document.layers) ? 1 : 0; var ie4up = (document.all) ? 1 : 0; var dx, xp, yp; var am, stx, sty; var i, doc_width = 800, doc_height = 600; if (ns4up) { doc_width = self.innerWidth; doc_height = self.innerHeight; } else if (ie4up) { doc_width = document.body.clientWidth; doc_height = document.body.clientHeight; } dx = new Array(); xp = new Array(); yp = new Array(); am = new Array(); stx = new Array(); sty = new Array(); for (i = 0; i < no; ++ i) { dx[i] = 0; xp[i] = Math.random()*(doc_width-50); yp[i] = Math.random()*doc_height; am[i] = Math.random()*20; stx[i] = 0.02 + Math.random()/10; sty[i] = 0.7 + Math.random(); if (ns4up) { if (i == 0) { document.write("<layer name=\"dot"+ i +"\" left=\"15\" "); document.write("top=\"15\" visibility=\"show\"><img src=\""); document.write(snowflake + "\" border=\"0\"></layer>"); } else { document.write("<layer name=\"dot"+ i +"\" left=\"15\" "); document.write("top=\"15\" visibility=\"show\"><img src=\""); //lwf document.write(snowflake + "\" border=\"0\"></layer>"); } } else if (ie4up) { if (i == 0) { document.write("<div id=\"dot"+ i +"\" style=\"POSITION: "); document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: "); document.write("visible; TOP: 15px; LEFT: 15px;\"><img src=\""); document.write(snowflake + "\" border=\"0\"></div>"); } else { document.write("<div id=\"dot"+ i +"\" style=\"POSITION: "); document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: "); document.write("visible; TOP: 15px; LEFT: 15px;\"><img src=\""); document.write(snowflake + "\" border=\"0\"></div>"); } } } function snowNS() { for (i = 0; i < no; ++ i) { yp[i] += sty[i]; //lwf if (yp[i] > doc_height-50) { xp[i] = Math.random()*(doc_width-am[i]-30); yp[i] = 0; stx[i] = 0.02 + Math.random()/10; sty[i] = 0.7 + Math.random(); doc_width = self.innerWidth; doc_height = self.innerHeight; } dx[i] += stx[i]; document.layers["dot"+i].top = yp[i]; document.layers["dot"+i].left = xp[i] + am[i]*Math.sin(dx[i]); } setTimeout("snowNS()", speed); } function snowIE() { for (i = 0; i < no; ++ i) { yp[i] += sty[i]; if (yp[i] > doc_height-50) { xp[i] = Math.random()*(doc_width-am[i]-30); yp[i] = 0; stx[i] = 0.02 + Math.random()/10; sty[i] = 0.7 + Math.random(); doc_width = document.body.clientWidth; doc_height = document.body.clientHeight; } dx[i] += stx[i]; document.all["dot"+i].style.pixelTop = yp[i]; document.all["dot"+i].style.pixelLeft = xp[i] + am[i]*Math.sin(dx[i]); } setTimeout("snowIE()", speed); } if (ns4up) { snowNS(); } else if (ie4up) { snowIE(); } // fin --> </SCRIPT>[/hide]
Слайд баннеров с ссылками
[hide=2]<script type="text/javascript"> /*********************************************** * Translucent Slideshow script- © Dynamic Drive DHTML code library (www.dynamicdrive.com) * This notice MUST stay intact for legal use * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code ***********************************************/ var trans_width='99px' //slideshow width var trans_height='79px' //slideshow height var pause=3000 //SET PAUSE BETWEEN SLIDE (7000=3 seconds) var degree=10 //animation speed. Greater is faster. var slideshowcontent=new Array() //Define slideshow contents: [image URL, OPTIONAL LINK, OPTIONAL LINK TARGET] slideshowcontent[0]=["http://www.strecoza.net/mybanner/11.gif", "http://www.strecoza.net/", "_new"] slideshowcontent[1]=["http://www.strecoza.net/mybanner/22.gif", "http://www.strecoza.net/", "_new"] slideshowcontent[2]=["http://www.strecoza.net/mybanner/33.gif", "http://www.strecoza.net/", "_new"] ////NO need to edit beyond here///////////// var bgcolor='ffffff' var imageholder=new Array() for (i=0;i<slideshowcontent.length;i++){ imageholder[i]=new Image() imageholder[i].src=slideshowcontent[i][0] } var ie4=document.all var dom=document.getElementById&&navigator.userAgent.indexOf("Opera")==-1 if (ie4||dom) document.write('<div style="position:relative;width:'+trans_width+';height:'+trans_height+';overflow:hidden"><div id="canvas0" style="position:absolute;background-color:'+bgcolor+';width:'+trans_width+';height:'+trans_height+';left:-'+trans_width+';filter:alpha(opacity=20);-moz-opacity:0.2;"></div><div id="canvas1" style="position:absolute;background-color:'+bgcolor+';width:'+trans_width+';height:'+trans_height+';left:-'+trans_width+';filter:alpha(opacity=20);-moz-opacity:0.2;"></div></div>') else if (document.layers){ document.write('<ilayer id=tickernsmain visibility=hide width='+trans_width+' height='+trans_height+' bgColor='+bgcolor+'><layer id=tickernssub width='+trans_width+' height='+trans_height+' left=0 top=0>'+'<img src="'+slideshowcontent[0][0]+'"></layer></ilayer>') } var curpos=trans_width*(-1) var curcanvas="canvas0" var curindex=0 var nextindex=1 function getslidehtml(theslide){ var slidehtml="" if (theslide[1]!="") slidehtml='<a href="'+theslide[1]+'" target="'+theslide[2]+'">' slidehtml+='<img src="'+theslide[0]+'" border="0">' if (theslide[1]!="") slidehtml+='</a>' return slidehtml } function moveslide(){ if (curpos<0){ curpos=Math.min(curpos+degree,0) tempobj.style.left=curpos+"px" } else{ clearInterval(dropslide) if (crossobj.filters) crossobj.filters.alpha.opacity=100 else if (crossobj.style.MozOpacity) crossobj.style.MozOpacity=1 nextcanvas=(curcanvas=="canvas0")? "canvas0" : "canvas1" tempobj=ie4? eval("document.all."+nextcanvas) : document.getElementById(nextcanvas) tempobj.innerHTML=getslidehtml(slideshowcontent[curindex]) nextindex=(nextindex<slideshowcontent.length-1)? nextindex+1 : 0 setTimeout("rotateslide()",pause) } } function rotateslide(){ if (ie4||dom){ resetit(curcanvas) crossobj=tempobj=ie4? eval("document.all."+curcanvas) : document.getElementById(curcanvas) crossobj.style.zIndex++ if (crossobj.filters) document.all.canvas0.filters.alpha.opacity=document.all.canvas1.filters.alpha.opacity=20 else if (crossobj.style.MozOpacity) document.getElementById("canvas0").style.MozOpacity=document.getElementById("canvas1").style.MozOpacity=0.2 var temp='setInterval("moveslide()",50)' dropslide=eval(temp) curcanvas=(curcanvas=="canvas0")? "canvas1" : "canvas0" } else if (document.layers){ crossobj.document.write(getslidehtml(slideshowcontent[curindex])) crossobj.document.close() } curindex=(curindex<slideshowcontent.length-1)? curindex+1 : 0 } function jumptoslide(which){ curindex=which rotateslide() } function resetit(what){ curpos=parseInt(trans_width)*(-1) var crossobj=ie4? eval("document.all."+what) : document.getElementById(what) crossobj.style.left=curpos+"px" } function startit(){ crossobj=ie4? eval("document.all."+curcanvas) : dom? document.getElementById(curcanvas) : document.tickernsmain.document.tickernssub if (ie4||dom){ crossobj.innerHTML=getslidehtml(slideshowcontent[curindex]) rotateslide() } else{ document.tickernsmain.visibility='show' curindex++ setInterval("rotateslide()",pause) } } if (window.addEventListener) window.addEventListener("load", startit, false) else if (window.attachEvent) window.attachEvent("onload", startit) else if (ie4||dom||document.layers) window.onload=startit </script>[/hide]
Поделиться52010-05-13 15:41:08
Если у кого вопросы по скриптам - сюда! И если вы ищете какой-то скрипт - тоже сюда))
Поделиться62010-05-13 16:41:13
Если у кого вопросы по скриптам - сюда! И если вы ищете какой-то скрипт - тоже сюда))
агЫ.
Поделиться72012-09-20 09:37:28
Коды кодами, а куды их вставлять?...
Поделиться82012-09-21 13:49:49
Инесса Джейрелл, в настройках в html-верх, скрипты под баннеры - в html-низ