Podstawowe skrypty |
kacia
Apple Blogger
|
Pozwoliłam sobie spisać pare skryptów. Oto one:
----> 1. Blokada prawego przycisku myszki z wyskakujacym alertem (w funkcji "head") <script language="Javascript1.2"> // (C) 2000 [link widoczny dla zalogowanych] // [link widoczny dla zalogowanych] // Free for all users, but leave in this header // Set the message for the alert box am = "No, na pewno xP"; // do not edit below this line // =========================== bV = parseInt(navigator.appVersion) bNS = navigator.appName=="Netscape" bIE = navigator.appName=="Microsoft Internet Explorer" function nrc(e) { if (bNS && e.which > 1){ alert(am) return false } else if (bIE && (event.button >1)) { alert(am) return false; } } function clickIE() {if (document.all) {alert(am);return false;}} function clickNS(e) {if (document.layers||(document.getElementById&&!document.all)) { if (e.which==2||e.which==3) {alert(am);return false;}}} if (document.layers) {document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;} else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;} </script> ------> 2. Seria komunikatów (w funkcji "head") <FORM> <INPUT TYPE="button" Value=" Przeczytaj te informacje " onClick="alert('To jest pierwsza informacja');alert('To jest druga informacja');alert('To jest trzecia informacja')")> </FORM> -----> 3. Wiadomosć na pasku statusu (w funkcji "head") <!-- [link widoczny dla zalogowanych] [link widoczny dla zalogowanych] [link widoczny dla zalogowanych] (c) 1997 Semian Software, Script by: Michiel steendam Modify and use anyway you want, just mention this site. --> <SCRIPT> <!-- Hide from old browsers // All you have to do is put another text in the variable message. // Don't forget to break all lines with a ^ // When you do not place a ^ at the end of all the message, the // message will not repeat message = "Serdecznie Witam^" + "Mam nadzieje, ze Ci sie tu spodoba!^" + "Skomentujesz mi coś? Bede bardzo wdzieczna :P^" + "Wpadaj tu czesto^" + "Pozdrawiam!^" + "^" scrollSpeed = 20 lineDelay = 1500 // Do not change the text below // txt = "" function scrollText(pos) { if (message.charAt(pos) != '^') { txt = txt + message.charAt(pos) status = txt pauze = scrollSpeed } else { pauze = lineDelay txt = "" if (pos == message.length-1) pos = -1 } pos++ setTimeout("scrollText('"+pos+"')",pauze) } // Unhide --> scrollText(0) </SCRIPT> -----> 4. Aktualizacja Strony <script language="JavaScript"> <!-- document.write("Aktualizacja: " + document.lastModified); // --> </script> -----> 5. Dzisiaj jest... - inaczej data :P <SCRIPT LANGUAGE="JavaScript"> <!-- Hide it // Returns today's date in a string with full day and month names // by Roger C. Scudder Jr. on 10-2-98 // corrected for Netscape by Grzegorz Golebiewski DayName = new Array(7) DayName[0] = "niedziela " DayName[1] = "poniedziałek " DayName[2] = "wtorek " DayName[3] = "środa " DayName[4] = "czwartek " DayName[5] = "piątek " DayName[6] = "sobota " MonthName = new Array(12) MonthName[0] = "stycznia " MonthName[1] = "lutego " MonthName[2] = "marca " MonthName[3] = "kwietnia " MonthName[4] = "maja " MonthName[5] = "czerwca " MonthName[6] = "lipca " MonthName[7] = "sierpnia " MonthName[8] = "września " MonthName[9] = "października " MonthName[10] = "listopada " MonthName[11] = "grudnia " function getDateStr(){ var Today = new Date() var WeekDay = Today.getDay() var Month = Today.getMonth() var Day = Today.getDate() var Year = Today.getFullYear() if(Year <= 99) Year += 1900 return DayName[WeekDay] + "," + " " + Day + " " + MonthName[Month] + ", " + Year } //--> </SCRIPT> <SCRIPT>document.write("Dzisiaj jest " + getDateStr())</SCRIPT> -------> 6. Dni tygodnia <SCRIPT LANGUAGE="JavaScript"> <!-- document.write("<center><b>") now = new Date() if (now.getDay() == 5) document.write("Cudownie, już piątek!") if (now.getDay() == 6) document.write("Wreszcie upragniony weekend!") if (now.getDay() == 0) document.write("Ojej, weekend się powoli kończy!") if (now.getDay() == 1) document.write("Dzisiaj jest poniedziałek. To na pewno będzie udany tydzień!") if (now.getDay() == 2) document.write("Wtorek, poniedziałek już na szczęście za nami!") if (now.getDay() == 3) document.write("Środa, czy Twój tydzień jest również udany?") if (now.getDay() == 4) document.write("Czwartek, weekend już tuż tuż...") document.write("</b></center>") //--> </SCRIPT> ----> 7. Data <script language="javascript"> <!-- W3e JAVAScript Preset/Date var DDMMYY =0 var MMDDYY =1 function getdate(mode) { var now = new Date(); var dayNr = ((now.getDate()<10) ? "0" : "")+ now.getDate(); if (mode==DDMMYY) var MonthDayYear =(dayNr+"/"+(now.getMonth()+1)+"/"+now.getFullYear()); else var MonthDayYear =((now.getMonth()+1)+"/"+dayNr+"/"+now.getFullYear()); return MonthDayYear; } function gettime() { var now = new Date(); var ampm = (now.getHours() >= 12) ? " P.M." : " A.M." var hours = now.getHours(); hours = ((hours > 12) ? hours - 12 : hours); var minutes = ((now.getMinutes() < 10) ? ":0" : ":") + now.getMinutes(); var seconds = ((now.getSeconds() < 10) ? ":0" : ":") + now.getSeconds(); var TimeValue =(" " + hours + minutes + seconds + " " + ampm); return TimeValue; }//--> </script> <script language="javascript">document.write(getdate(DDMMYY));</script> -------> 8. Hasło na bloga (w funkcji "head") <script language="JavaScript"> <!--hide var password; var pass1="niania"; password=prompt('Wpisz hasło :P'); if (password==pass1) alert('Hasło poprawne :P Witaj!'); else { window.location="http://adres bloga"; } //--> </script> ------> 9. Obrazek latający za myszką (w funkcji "head") <div id=dot0 style="height: 20; position: absolute; visibility: hidden; width: 2; left: 12; top: 0"><img src="adres gifa"></div> <div id=dot1 style="HEIGHT: 11px; POSITION: absolute; WIDTH: 11px"><img src="adres gifa"></div> <div id=dot2 style="HEIGHT: 11px; POSITION: absolute; WIDTH: 11px"><img height=16 src="adres gifa" width=17></div> <div id=dot3 style="HEIGHT: 11px; POSITION: absolute; WIDTH: 11px"><img height=15 src="adres gifa" width=15></div> <div id=dot4 style="HEIGHT: 11px; POSITION: absolute; WIDTH: 11px"><img height=12 src="adres gifa" width=12></div> <div id=dot5 style="HEIGHT: 11px; POSITION: absolute; WIDTH: 11px"><img height=9 src="adres gifa" width=10></div> <div id=dot6 style="HEIGHT: 11px; POSITION: absolute; WIDTH: 11px"><img height=8 src="adres gifa" width=10></div> <script language=JavaScript> <!-- hide code /* Elastic Trail script (By Philip Winston @ [link widoczny dla zalogowanych], URL:http://members.xoom.com/ebullets) Script featured on Dynamicdrive.com For this and 100's more DHTML scripts, visit [link widoczny dla zalogowanych] */ // Thanks to Troels Jakobsen <tjak@get2net.dk> // for fix which makes it work when the page is scrolled var nDots = 7; if (document.all&&window.print) document.body.style.cssText="overflow-x:hidden;overflow-y:scroll" var Xpos = 0; var Ypos = 0; // fixed time step, no relation to real time var DELTAT = .01; // size of one spring in pixels var SEGLEN = 10; // spring constant, stiffness of springs var SPRINGK = 10; // all the physics is bogus, just picked stuff to // make it look okay var MASS = 1; var GRAVITY = 50; var RESISTANCE = 10; // stopping criterea to prevent endless jittering // doesn't work when sitting on bottom since floor // doesn't push back so acceleration always as big // as gravity var STOPVEL = 0.1; var STOPACC = 0.1; var DOTSIZE = 11; // BOUNCE is percent of velocity retained when // bouncing off a wall var BOUNCE = 0.75; var isNetscape = navigator.appName=="Netscape"; // always on for now, could be played with to // let dots fall to botton, get thrown, etc. var followmouse = true; var dots = new Array(); init(); function init() { var i = 0; for (i = 0; i < nDots; i++) { dots[i] = new dot(i); } if (!isNetscape) { // I only know how to read the locations of the // <LI> items in IE //skip this for now // setInitPositions(dots) } // set their positions for (i = 0; i < nDots; i++) { dots[i].obj.left = dots[i].X; dots[i].obj.top = dots[i].Y; } if (isNetscape) { // start right away since they are positioned // at 0, 0 startanimate(); } else { // let dots sit there for a few seconds // since they're hiding on the real bullets setTimeout("startanimate()", 2000); } } function dot(i) { this.X = Xpos; this.Y = Ypos; this.dx = 0; this.dy = 0; if (isNetscape) { this.obj = eval("document.dot" + i); } else { this.obj = eval("dot" + i + ".style"); } } function startanimate() { setInterval("animate()", 20); } // This is to line up the bullets with actual LI tags on the page // Had to add -DOTSIZE to X and 2*DOTSIZE to Y for IE 5, not sure why // Still doesn't work great function setInitPositions(dots) { // initialize dot positions to be on top // of the bullets in the <ul> var startloc = document.all.tags("LI"); var i = 0; for (i = 0; i < startloc.length && i < (nDots - 1); i++) { dots[i+1].X = startloc[i].offsetLeft startloc[i].offsetParent.offsetLeft - DOTSIZE; dots[i+1].Y = startloc[i].offsetTop + startloc[i].offsetParent.offsetTop + 2*DOTSIZE; } // put 0th dot above 1st (it is hidden) dots[0].X = dots[1].X; dots[0].Y = dots[1].Y - SEGLEN; } // just save mouse position for animate() to use function MoveHandler(e) { Xpos = e.pageX; Ypos = e.pageY; return true; } // just save mouse position for animate() to use function MoveHandlerIE() { Xpos = window.event.x + document.body.scrollLeft; Ypos = window.event.y + document.body.scrollTop; } if (isNetscape) { document.captureEvents(Event.MOUSEMOVE); document.onMouseMove = MoveHandler; } else { document.onmousemove = MoveHandlerIE; } function vec(X, Y) { this.X = X; this.Y = Y; } // adds force in X and Y to spring for dot[i] on dot[j] function springForce(i, j, spring) { var dx = (dots[i].X - dots[j].X); var dy = (dots[i].Y - dots[j].Y); var len = Math.sqrt(dx*dx + dy*dy); if (len > SEGLEN) { var springF = SPRINGK * (len - SEGLEN); spring.X += (dx / len) * springF; spring.Y += (dy / len) * springF; } } function animate() { // dots[0] follows the mouse, // though no dot is drawn there var start = 0; if (followmouse) { dots[0].X = Xpos; dots[0].Y = Ypos; start = 1; } for (i = start ; i < nDots; i++ ) { var spring = new vec(0, 0); if (i > 0) { springForce(i-1, i, spring); } if (i < (nDots - 1)) { springForce(i+1, i, spring); } // air resisitance/friction var resist = new vec(-dots[i].dx * RESISTANCE, -dots[i].dy * RESISTANCE); // compute new accel, including gravity var accel = new vec((spring.X + resist.X)/ MASS, (spring.Y + resist.Y)/ MASS + GRAVITY); // compute new velocity dots[i].dx += (DELTAT * accel.X); dots[i].dy += (DELTAT * accel.Y); // stop dead so it doesn't jitter when nearly still if (Math.abs(dots[i].dx) < STOPVEL && Math.abs(dots[i].dy) < STOPVEL && Math.abs(accel.X) < STOPACC && Math.abs(accel.Y) < STOPACC) { dots[i].dx = 0; dots[i].dy = 0; } // move to new position dots[i].X += dots[i].dx; dots[i].Y += dots[i].dy; // get size of window var height, width; if (isNetscape) { height = window.innerHeight + document.scrollTop; width = window.innerWidth + document.scrollLeft; } else { height = document.body.clientHeight + document.body.scrollTop; width = document.body.clientWidth + document.body.scrollLeft; } // bounce of 3 walls (leave ceiling open) if (dots[i].Y >= height - DOTSIZE - 1) { if (dots[i].dy > 0) { dots[i].dy = BOUNCE * -dots[i].dy; } dots[i].Y = height - DOTSIZE - 1; } if (dots[i].X >= width - DOTSIZE) { if (dots[i].dx > 0) { dots[i].dx = BOUNCE * -dots[i].dx; } dots[i].X = width - DOTSIZE - 1; } if (dots[i].X < 0) { if (dots[i].dx < 0) { dots[i].dx = BOUNCE * -dots[i].dx; } dots[i].X = 0; ----> 10. Zegarek latający za myszką (w funkcji "head") <SCRIPT LANGUAGE="JavaScript"> <!-- Begin fCol='lightskayblue';//face colour. dCol='red';//dot colour. hCol='fff000';//hours colour. mCol='fff000';//minutes colour. sCol='7788ff';//seconds colour. ClockHeight=35; ClockWidth=35; ClockFromMouseY=80; ClockFromMouseX=5; //Alter nothing below! Alignments will be lost! ns=(document.layers); ie=(document.all); h=3; m=4; s=5; face='1 2 3 4 5 6 7 8 9 10 11 12'; face=face.split(' '); n=face.length; speed=0.6; ymouse=0; xmouse=0; scrll=0; p="<font face=Arial size=1 color="+fCol+">"; e=360/n; HandHeight=ClockHeight/4; HandWidth=ClockWidth/4; HandY=0; HandX=0; scrll=0; y=new Array();x=new Array();Y=new Array();X=new Array(); for (i=0; i < 37; i++){y[i]=0;x[i]=0;Y[i]=0;X[i]=0} Dy=new Array();Dx=new Array();DY=new Array();DX=new Array(); for (i=0; i < n; i++){Dy[i]=0;Dx[i]=0;DY[i]=0;DX[i]=0} if (ns){ for (i=0; i < n; i++) document.write('<layer name="nsN'+i+'" top=0 left=0 height=15 width=15><center>'+p+face[i]+'</font></center></layer>'); for (i=0; i < n; i++) document.write('<layer name="nsD'+i+'" top=0 left=0 bgcolor='+dCol+' clip="0,0,2,2"></layer>'); for (i=0; i < h; i++) document.write('<layer name=nsH'+i+' top=0 left=0 bgcolor='+hCol+' clip="0,0,2,2"></layer>'); for (i=0; i < m; i++) document.write('<layer name=nsM'+i+' top=0 left=0 bgcolor='+mCol+' clip="0,0,2,2"></layer>'); for (i=0; i < s; i++) document.write('<layer name=nsS'+i+' top=0 left=0 bgcolor='+sCol+' clip="0,0,2,2"></layer>'); } if (ie){ document.write('<div id="On" style="position:absolute;top:0px;left:0px"><div style="position:relative">'); for (i=0; i < n; i++) document.write('<div id="ieN" style="position:absolute;width:15px;height:15px;text-align:center">'+p+face[i]+'</font></div>'); document.write('</div></div>'); document.write('<div id="Od" style="position:absolute;top:0px;left:0px"><div style="position:relative">'); for (i=0; i < n; i++) document.write('<div id="ieD" style="position:absolute;height:2px;width:2px;font-size:2px;background:'+dCol+'"></div>'); document.write('</div></div>'); document.write('<div id="Oh" style="position:absolute;top:0px;left:0px"><div style="position:relative">'); for (i=0; i < h; i++) document.write('<div id="ieH" style="position:absolute;width:2px;height:2px;font-size:2px;background:'+hCol+'"></div>'); document.write('</div></div>'); document.write('<div id="Om" style="position:absolute;top:0px;left:0px"><div style="position:relative">'); for (i=0; i < m; i++) document.write('<div id="ieM" style="position:absolute;width:2px;height:2px;font-size:2px;background:'+mCol+'"></div>'); document.write('</div></div>') document.write('<div id="Os" style="position:absolute;top:0px;left:0px"><div style="position:relative">'); for (i=0; i < s; i++) document.write('<div id="ieS" style="position:absolute;width:2px;height:2px;font-size:2px;background:'+sCol+'"></div>'); document.write('</div></div>') } (ns)?window.captureEvents(Event.MOUSEMOVE):0; function Mouse(evnt){ ymouse = (ns)?evnt.pageY+ClockFromMouseY-(window.pageYOffset):event.y+ClockFromMouseY; xmouse = (ns)?evnt.pageX+ClockFromMouseX:event.x+ClockFromMouseX; } (ns)?window.onMouseMove=Mouse:document.onmousemove=Mouse; function ClockAndAssign(){ time = new Date (); secs = time.getSeconds(); sec = -1.57 + Math.PI * secs/30; mins = time.getMinutes(); min = -1.57 + Math.PI * mins/30; hr = time.getHours(); hrs = -1.575 + Math.PI * hr/6+Math.PI*parseInt(time.getMinutes())/360; if (ie){ On.style.top=window.document.body.scrollTop; Od.style.top=window.document.body.scrollTop; Oh.style.top=window.document.body.scrollTop; Om.style.top=window.document.body.scrollTop; Os.style.top=window.document.body.scrollTop; } for (i=0; i < s; i++){ var sd=(ns)?document.layers['nsS'+i]:ieS[i].style; sd.top=y[8+i]+HandY+(i*HandHeight)*Math.sin(sec)+scrll; sd.left=x[8+i]+HandX+(i*HandWidth)*Math.cos(sec); } for (i=0; i < m; i++){ var md=(ns)?document.layers['nsM'+i]:ieM[i].style; md.top=y[4+i]+HandY+(i*HandHeight)*Math.sin(min)+scrll; md.left=x[4+i]+HandX+(i*HandWidth)*Math.cos(min); } for (i=0; i < h; i++){ var hd=(ns)?document.layers['nsH'+i]:ieH[i].style; hd.top=y[1+i]+HandY+(i*HandHeight)*Math.sin(hrs)+scrll; hd.left=x[1+i]+HandX+(i*HandWidth)*Math.cos(hrs); } for (i=0; i < n; i++){ var D=(ns)?document.layers['nsD'+i]:ieD[i].style; D.top=y[13+i] + ClockHeight*Math.sin(-1.0471 + i*e*Math.PI/180)+scrll; D.left=x[13+i] + ClockWidth*Math.cos(-1.0471 + i*e*Math.PI/180); } for (i=0; i < n; i++){ var N=(ns)?document.layers['nsN'+i]:ieN[i].style; N.top=y[25+i]-6 + ClockHeight*1.4*Math.sin(-1.0471 + i*e*Math.PI/180)+scrll; N.left=x[25+i]-6 + ClockWidth*1.4*Math.cos(-1.0471 + i*e*Math.PI/180); } } function Delay(){ scrll=(ns)?window.pageYOffset:0; y[0]=Math.round(Y[0]+=((ymouse)-Y[0])*speed); x[0]=Math.round(X[0]+=((xmouse)-X[0])*speed); for (i=1; i < 37; i++){ y[i]=Math.round(Y[i]+=(y[i-1]-Y[i])*speed); x[i]=Math.round(X[i]+=(x[i-1]-X[i])*speed); } ClockAndAssign(); setTimeout('Delay()',20); } if (ns||ie)window.onload=Delay; // End --> </script> :arrow: 11. Rozwijalne menu <script language="JavaScript1.2"> var ns6=document.getElementById&&!document.all?1:0 var head="display:''" var folder='' function expandit(curobj){ folder=ns6?curobj.nextSibling.nextSibling.style:document.all [curobj.sourceIndex+1].style if (folder.display=="none") folder.display="" else folder.display="none" } //--> </script> <h6 style="cursor:hand" style="font-size:8pt" onClick="expandit (this)"">NAZWA</h6> <span style="display:none" style=&{head};> zawartość </span> </script><BR><BR> :arrow: 12. Fajerwerki z myszki :P (w furnkcji "head") <script> var xLayerNo=0; function xLayer(xHtml, x, y, w) { if(x==null)x=0; if(y==null)y=0; if(w==null)w=100; if(document.layers) { this.layer=new Layer(w); this.layer.document.open(); this.layer.document.write(xHtml); this.layer.document.close(); this.layer.moveTo(x,y); this.images=this.layer.document.images; /*** These used to be prototypes (like IE ) but when NS (communicator) 4.7 ***/ /*** first loads up, for some reason the prototypes do not get assigned ***/ this.moveTo = function(x,y) { this.layer.moveTo(x,y); } this.moveBy = function(x,y) { this.layer.moveBy(x,y); } this.show = function() { this.layer.visibility = "show"; } this.hide = function() { this.layer.visibility = "hide"; } this.setzIndex = function(z) { this.layer.zIndex = z; } this.setBgColor = function(color) { this.layer.bgColor = color; } this.setBgImage = function(image) { this.layer.background.src = image; } this.getX = function() { return this.layer.left; } this.getY = function() { return this.layer.right; } this.getWidth = function() { return this.layer.width; } this.getHeight = function() { return this.layer.height; } this.getStackingOrder = function() { return this.layer.zIndex; } this.isVisible = function() { return this.layer.visibility == "show"; } this.setContent = function(xHtml) { this.layer.document.open(); this.layer.document.write(xHtml); this.layer.document.close(); } this.clip = function(x1,y1, x2,y2) { this.layer.clip.top =y1; this.layer.clip.left =x1; this.layer.clip.bottom =y2; this.layer.clip.right =x2; } } else if(document.all) { var xName="xLayer" + xLayerNo++; txt = "<DIV ID='" + xName + "' STYLE=\"position:absolute;" + "left:" + x + ";" + "top:" + y + ";" + "width:" + w + ";" + "visibility:hidden\">" + xHtml + "</DIV>"; document.body.insertAdjacentHTML("BeforeEnd",txt); this.content = document.all[xName]; this.layer = document.all[xName].style; this.images = document.images; } return(this); } if(document.layers) { /**** START prototypes for NS ***/ /*** END NS ***/ } else if(document.all) { /*** START prototypes for IE ***/ xLayer.prototype.moveTo = function(x,y) { this.layer.pixelLeft = x; this.layer.pixelTop = y; } xLayer.prototype.moveBy = function(x,y) { this.layer.pixelLeft += x; this.layer.pixelTop += y; } xLayer.prototype.show = function() { this.layer.visibility = "visible"; } xLayer.prototype.hide = function() { this.layer.visibility = "hidden"; } xLayer.prototype.setzIndex = function(z) { this.layer.zIndex = z; } xLayer.prototype.setBgColor = function(color) { this.layer.backgroundColor = color; } xLayer.prototype.setBgImage = function(image) { this.layer.backgroundImage = image; } xLayer.prototype.setContent = function(xHtml) { this.content.innerHTML=xHtml; } xLayer.prototype.getX = function() { return this.layer.pixelLeft; } xLayer.prototype.getY = function() { return this.layer.pixelRight; } xLayer.prototype.getWidth = function() { return this.layer.pixelWidth; } xLayer.prototype.getHeight = function() { return this.layer.pixelHeight; } xLayer.prototype.getStackingOrder = function() { return this.layer.zIndex; } xLayer.prototype.isVisible = function() { return this.layer.visibility == "visible"; } xLayer.prototype.clip = function(x1,y1, x2,y2) { this.layer.clip="rect("+y1+" "+x2+" "+y2+" "+x1+")"; this.layer.pixelWidth=x2; this.layer.pixelHeight=y2; this.layer.overflow="hidden"; } /*** END IE ***/ } else { xLayer.prototype.moveTo = function(x,y) { } xLayer.prototype.moveBy = function(x,y) { } xLayer.prototype.show = function() { } xLayer.prototype.hide = function() { } xLayer.prototype.setStackingOrder = function(z) { } xLayer.prototype.setBgColor = function(color) { } xLayer.prototype.setBgImage = function(image) { } xLayer.prototype.getX = function() { return 0; } xLayer.prototype.getY = function() { return 0; } xLayer.prototype.getWidth = function() { return 0; } xLayer.prototype.getHeight = function() { return 0; } xLayer.prototype.getStackingOrder = function() { return 0; } xLayer.prototype.isVisible = function() { return false; } xlayer.prototype.setContent = function(xHtml) { } } /*** End - xLayer - a cross browser layer object by [link widoczny dla zalogowanych] ***/ var theTimer=null; var mouseX = 100; var mouseY = 100; var oneDeg=(2*Math.PI)/360; /*** Pinwheel type 1 ***/ var Radius = 5; var NumStars=32; var NumSteps=16; var StepAngle=(25)*oneDeg; /*** Pinwheel type 2 ***/ //var Radius = 10; //var NumStars=16; //var NumSteps=8; //var StepAngle=(22.5)*oneDeg; /*** Pinwheel type 3 ***/ //var Radius = 5; //var NumStars=16; //var NumSteps=16; //var StepAngle=(22.5)*oneDeg; /*** Pinwheel type 4 ***/ //var Radius = 10; //var NumStars=32; //var NumSteps=16; //var StepAngle=(11.25)*oneDeg; var StarObject=new Array(); var hexDigit=new Array("0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"); function dec2hex(dec) { return(hexDigit[dec>>4]+hexDigit[dec&15]); } function hex2dec(hex) { return(parseInt(hex,16)) } function CreateStar() { this.layer = new xLayer(" ", 100, 100, 10); this.currAngle = 0; this.step = 0; this.x = 100; this.y = 100; return (this); } function restart() { for(i=0;i<NumStars;i++) { StarObject[i].currAngle = (StepAngle*i); StarObject[i].step = (i%NumSteps); StarObject[i].x = mouseX; StarObject[i].y = mouseY; StarObject[i].layer.moveTo(mouseX, mouseY); StarObject[i].layer.show(); } } /*** Choose a random pinwheel configuration ***/ function next_random() { var num=Math.floor(Math.random()*4); for(i=0;i<NumStars;i++) StarObject[i].layer.hide(); if(num==0){ Radius = 5; NumStars=32; NumSteps=16; StepAngle=(25)*oneDeg; } else if(num==1){ Radius = 10; NumStars=16; NumSteps=8; StepAngle=(22.5)*oneDeg; } else if(num==2){ Radius = 5; NumStars=16; NumSteps=16; StepAngle=(22.5)*oneDeg; } else{ Radius = 10; NumStars=32; NumSteps=16; StepAngle=(11.25)*oneDeg; } for(i=0 ; i<NumStars; i++) { var s=StarObject[i]; s.currAngle = (StepAngle*i); s.step = (i%NumSteps); s.x=mouseX; s.y=mouseY; } restart(); theTimer=setTimeout("next_random()", 10000); } function start() { if (document.all) document.onmousemove = IE_MouseMove; if (document.layers) { window.captureEvents(Event.MOUSEMOVE); window.onmousemove = NS_MouseMove; } for(i=0 ; i<NumStars; i++) { StarObject[i]=new CreateStar(); StarObject[i].currAngle = (StepAngle*i); StarObject[i].step = (i%NumSteps); StarObject[i].layer.clip(0,0,2,2); StarObject[i].layer.setBgColor("red"); } for(i=0 ; i<NumStars ; i++) StarObject[i].layer.show(); /*** Remove this if you only 1 type of pinwheel ***/ theTimer=setTimeout("next_random()", 10000); Rotate(); } function changeColour(s) { var colour=""; r2= Math.floor(Math.random()*2)*255; g2= Math.floor(Math.random()*2)*255; b2= Math.floor(Math.random()*2)*255; if(r2==0 && g2==0 && b2==0) r2=255; colour = "#" + dec2hex(r2) + dec2hex(g2) + dec2hex(b2); s.layer.setBgColor(colour); s.x=mouseX; s.y=mouseY; } function Rotate() { var x; var y; for (i = 0 ; i < NumStars ; i++ ) { var s=StarObject[i]; if(s.step==0) changeColour(s); var angle = s.currAngle; var rad = s.step*Radius + 10; x = s.x + rad*Math.cos(angle); y = s.y + rad*Math.sin(angle); s.layer.moveTo(x,y); s.step = (s.step+1)%NumSteps; } setTimeout("Rotate()", 30); } function IE_MouseMove() { mouseX = document.body.scrollLeft+event.x; mouseY = document.body.scrollTop+event.y; } function NS_MouseMove(evnt) { mouseX = evnt.pageX; mouseY = evnt.pageY; } function handle_resize() { if(document.layers) start(); } window.onresize=handle_resize; window.onload=start; </script> :arrow: 13. Blokada prawego przycisku myszki bez alertu (w funkcji "head") <script language=JavaScript> <!-- //Disable right click script III- By Renigade (renigade@mediaone.net) //For full source code, visit [link widoczny dla zalogowanych] var message=""; /////////////////////////////////// function clickIE() {if (document.all) {(message);return false;}} function clickNS(e) {if (document.layers||(document.getElementById&&!document.all)) { if (e.which==2||e.which==3) {(message);return false;}}} if (document.layers) {document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;} else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;} document.oncontextmenu=new Function("return false") // --> </script> VanillEDIT:Kacia, świetnie się spisałaś - temat przyklejam. :) |
||||||||||||||
Post został pochwalony 0 razy Ostatnio zmieniony przez kacia dnia Sob 23:21, 26 Lis 2005, w całości zmieniany 3 razy |
Igumen
Administrator
|
Eh .. ile tego...
Jest w czym wybierać Tylko wyłącz uśmieszki w poście, bo się niektórych skryptów nie da skopiowac.. |
||||||||||||||
Post został pochwalony 0 razy |
T42
I miejsce - Naj blog
|
Albo daj kody w funkcję [code] Podziekuję, ale nie skorzystam. Nie lubię :] |
||||||||||||||||
Post został pochwalony 0 razy |
Jamelia2
Nierób
|
Thank you ver much ^^
Chętnie skorzystam |
||||||||||||||
Post został pochwalony 0 razy |
asiaz
Super Blogger
|
Heeh:) Dużo. Przydatne. W jednym miejscu. Tak trzymać
|
||||||||||||||
Post został pochwalony 0 razy |
Panna_eM
Nierób
|
Dziękować, dziękować , może kiedyś skorzystam ^^
|
||||||||||||||
Post został pochwalony 0 razy |
wwbgl2y@gmail.com
Gość
|
[link widoczny dla zalogowanych] ringtones site free. ringtones site, Free nokia ringtones here, Download ringtones FREE. from website .
|
||||||||||||||
|
cherubini amplifier
Gość
|
[link widoczny dla zalogowanych] jcpenneys com: jcpenneys com, jcpenneys com, jcpenneys com; [link widoczny dla zalogowanych] cherubini amplifier: cherubini amplifier, cherubini amplifier, cherubini amplifier; cherubini amplifier
|
||||||||||||||
|
rtl nederland radio zende
Gość
|
[link widoczny dla zalogowanych] lo attesa: lo attesa, lo attesa, lo attesa; [link widoczny dla zalogowanych] pentax fotocamere digitali: pentax fotocamere digitali, pentax fotocamere digitali, pentax fotocamere digitali; [link widoczny dla zalogowanych] era bellisimo: era bellisimo, era bellisimo, era bellisimo; [link widoczny dla zalogowanych] societa di controllo: societa di controllo, societa di controllo, societa di controllo; [link widoczny dla zalogowanych] somavert 15mg poudre et solvant pour solution injectable: somavert 15mg poudre et solvant pour solution injectable, somavert 15mg poudre et solvant pour solution injectable, somavert 15mg poudre et solvant pour solution injectable; [link widoczny dla zalogowanych] lunasola: lunasola, lunasola, lunasola; [link widoczny dla zalogowanych] target 28 cpr 100mg 25mg: target 28 cpr 100mg 25mg, target 28 cpr 100mg 25mg, target 28 cpr 100mg 25mg; [link widoczny dla zalogowanych] rtl nederland radio zender: rtl nederland radio zender, rtl nederland radio zender, rtl nederland radio zender; rtl nederland radio zender
|
||||||||||||||
|
omocerco
Gość
|
[link widoczny dla zalogowanych] ups schuko: ups schuko, ups schuko, ups schuko; [link widoczny dla zalogowanych] c1969: c1969, c1969, c1969; [link widoczny dla zalogowanych] gianluca grignani mp3: gianluca grignani mp3, gianluca grignani mp3, gianluca grignani mp3; [link widoczny dla zalogowanych] logitech plus rechargeable optical mouse: logitech plus rechargeable optical mouse, logitech plus rechargeable optical mouse, logitech plus rechargeable optical mouse; [link widoczny dla zalogowanych] stato patrimoniale: stato patrimoniale, stato patrimoniale, stato patrimoniale; [link widoczny dla zalogowanych] naughty office: naughty office, naughty office, naughty office; [link widoczny dla zalogowanych] photo secession: photo secession, photo secession, photo secession; [link widoczny dla zalogowanych] omocerco: omocerco, omocerco, omocerco; omocerco
|
||||||||||||||
|
the lord of the ring
Gość
|
[link widoczny dla zalogowanych] videosorveglianza scheda pci: videosorveglianza scheda pci, videosorveglianza scheda pci, videosorveglianza scheda pci; [link widoczny dla zalogowanych] farcry instincts rinviato al secondo trimestre: farcry instincts rinviato al secondo trimestre, farcry instincts rinviato al secondo trimestre, farcry instincts rinviato al secondo trimestre; [link widoczny dla zalogowanych] andr delvaux una ricerca sulla forma: andr delvaux una ricerca sulla forma, andr delvaux una ricerca sulla forma, andr delvaux una ricerca sulla forma; [link widoczny dla zalogowanych] moglie viziosa: moglie viziosa, moglie viziosa, moglie viziosa; [link widoczny dla zalogowanych] porte blindate roma: porte blindate roma, porte blindate roma, porte blindate roma; [link widoczny dla zalogowanych] elviz martinez: elviz martinez, elviz martinez, elviz martinez; [link widoczny dla zalogowanych] thomson amplificatori home hi fi: thomson amplificatori home hi fi, thomson amplificatori home hi fi, thomson amplificatori home hi fi; [link widoczny dla zalogowanych] the lord of the ring: the lord of the ring, the lord of the ring, the lord of the ring; the lord of the ring
|
||||||||||||||
|
iceberg homme
Gość
|
[link widoczny dla zalogowanych] missmondo: missmondo, missmondo, missmondo; [link widoczny dla zalogowanych] mutuo agevolato: mutuo agevolato, mutuo agevolato, mutuo agevolato; [link widoczny dla zalogowanych] ethiopian airline: ethiopian airline, ethiopian airline, ethiopian airline; [link widoczny dla zalogowanych] terme toscana: terme toscana, terme toscana, terme toscana; [link widoczny dla zalogowanych] sit in: sit in, sit in, sit in; [link widoczny dla zalogowanych] gigaset siemens s645: gigaset siemens s645, gigaset siemens s645, gigaset siemens s645; [link widoczny dla zalogowanych] barkly: barkly, barkly, barkly; [link widoczny dla zalogowanych] iceberg homme: iceberg homme, iceberg homme, iceberg homme; iceberg homme
|
||||||||||||||
|
upside down
Gość
|
[link widoczny dla zalogowanych] frigorifero rex rd 165: frigorifero rex rd 165, frigorifero rex rd 165, frigorifero rex rd 165; [link widoczny dla zalogowanych] godin: godin, godin, godin; [link widoczny dla zalogowanych] traduzione ex ragazza eamon: traduzione ex ragazza eamon, traduzione ex ragazza eamon, traduzione ex ragazza eamon; [link widoczny dla zalogowanych] panasonic 8 4 mega: panasonic 8 4 mega, panasonic 8 4 mega, panasonic 8 4 mega; [link widoczny dla zalogowanych] webypro: webypro, webypro, webypro; [link widoczny dla zalogowanych] aggrastat 250mcg ml fl 50ml: aggrastat 250mcg ml fl 50ml, aggrastat 250mcg ml fl 50ml, aggrastat 250mcg ml fl 50ml; [link widoczny dla zalogowanych] kugler franz theodor: kugler franz theodor, kugler franz theodor, kugler franz theodor; [link widoczny dla zalogowanych] upside down: upside down, upside down, upside down; upside down
|
||||||||||||||
|
upside down
Gość
|
upside down
|
||||||||||||||
|
Podstawowe skrypty |
|
||
fora.pl - załóż własne forum dyskusyjne za darmo
Powered by phpBB © 2001-2004 phpBB Group
phpBB Style created by phpBBStyles.com and distributed by Styles Database.
Powered by phpBB © 2001-2004 phpBB Group
phpBB Style created by phpBBStyles.com and distributed by Styles Database.