Morkshark 0 Postado Setembro 17, 2012 Share Postado Setembro 17, 2012 1° Baixe o arquivo: http://www.sendspace.com/file/yqtzav -> By Morkshark 2° Vá na pasta do seu xampp e depois htdocs/layouts/tibiacom e abra com o bloco de notas seu layout.php Antes de </body> adicione: </SCRIPT> <div id="dot0" style="position: absolute; visibility: hidden; height: 11; width: 11;"></div> <div id="dot1" style="position: absolute; height: 35; width: 35;"><img src="ball1.gif" width="11" height="11" alt=""></div> <div id="dot2" style="position: absolute; height: 35; width: 35;"><img src="ball2.gif" width="11" height="11" alt="."></div> <div id="dot3" style="position: absolute; height: 35; width: 35;"><img src="ball1.gif" width="11" height="11" alt="."></div> <div id="dot4" style="position: absolute; height: 35; width: 35;"><img src="ball2.gif" width="11" height="11" alt="."></div> <div id="dot5" style="position: absolute; height: 35; width: 35;"><img src="ball1.gif" width="11" height="11" alt="."></div> <div id="dot6" style="position: absolute; height: 35; width: 35;"><img src="ball2.gif" width="11" height="11" alt="."></div> <script type='text/javascript'> <!-- Begin var nDots = 7; if (document.all&&window.print) document.body.style.cssText="overflow-x:hidden;overflow-y:scroll" var Xpos = 0; var Ypos = 0; var DELTAT = .01; var SEGLEN = 10; var SPRINGK = 10; var MASS = 1; var GRAVITY = 50; var RESISTANCE = 10; var STOPVEL = 0.1; var STOPACC = 0.1; var DOTSIZE = 35; var BOUNCE = 0.75; var isNetscape = navigator.appName=="Netscape"; var followmouse = true; var dots = new Array(); init(); function init() { var i = 0; for (i = 0; i < nDots; i++) { dots = new dot(i); } for (i = 0; i < nDots; i++) { dots.obj.left = dots.X + "px"; dots.obj.top = dots.Y + "px"; } if (isNetscape) { startanimate(); } else { setTimeout("startanimate()", 20); } } function dot(i) { this.X = Xpos; this.Y = Ypos; this.dx = 0; this.dy = 0; this.obj = eval("document.getElementById('dot" + i + "').style"); } document.onmousemove = MoveHandler; function startanimate() { setInterval("animate()", 20); } function MoveHandler(e) { if (!e) { Xpos = window.event.x + document.body.scrollLeft; Ypos = window.event.y + document.body.scrollTop; } else { Xpos = e.pageX; Ypos = e.pageY; } } function vec(X, Y) { this.X = X; this.Y = Y; } function springForce(i, j, spring) { var dx = (dots.X - dots[j].X); var dy = (dots.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() { 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); } var resist = new vec(-dots.dx * RESISTANCE, -dots.dy * RESISTANCE); var accel = new vec((spring.X + resist.X)/ MASS, (spring.Y + resist.Y)/ MASS + GRAVITY); dots.dx += (DELTAT * accel.X); dots.dy += (DELTAT * accel.Y); if (Math.abs(dots.dx) < STOPVEL && Math.abs(dots.dy) < STOPVEL && Math.abs(accel.X) < STOPACC && Math.abs(accel.Y) < STOPACC) { dots.dx = 0; dots.dy = 0; } dots.X += dots.dx; dots.Y += dots.dy; 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; } if (dots.Y >= height - DOTSIZE - 1) { if (dots.dy > 0) { dots.dy = BOUNCE * -dots.dy; } dots.Y = height - DOTSIZE - 1; } if (dots.X >= width - DOTSIZE) { if (dots.dx > 0) { dots.dx = BOUNCE * -dots.dx; } dots.X = width - DOTSIZE - 1; } if (dots.X < 0) { if (dots.dx < 0) { dots.dx = BOUNCE * -dots.dx; } dots.X = 0; } dots.obj.left = dots.X + "px"; dots.obj.top = dots.Y + "px"; } } // End --> </SCRIPT> Descompacte as imagem e coloque dentro da sua pasta HTDOCS! Link para o comentário Compartilhar em outros sites More sharing options...
Demonbholder 420 Postado Setembro 18, 2012 Share Postado Setembro 18, 2012 Movido para aprovação de tutoriais. Link para o comentário Compartilhar em outros sites More sharing options...
Stigal 584 Postado Setembro 18, 2012 Share Postado Setembro 18, 2012 Gostei da função, mas o topico foi feito as preças... falta organisação, separação, spoiler, creditos (*mesmo que seja somente seu), prints e informações gerais. Mas parabens. Quem quiser outros "ponteiros" usar o site: http://www.cursors-4u.com/cursor/ Atenciosamente, Stigal. Link para o comentário Compartilhar em outros sites More sharing options...
Oneshot 732 Postado Setembro 18, 2012 Share Postado Setembro 18, 2012 É um código pronto, não tem sentido ser movido para Aprovação de Tutoriais, moderação. Abraços. Link para o comentário Compartilhar em outros sites More sharing options...
Piabeta Kun 359 Postado Setembro 18, 2012 Share Postado Setembro 18, 2012 Cara, peimeiro que isso nao fica pra sessão de scripts e sim de websites, e isso é mais velho que o tempo que eu estou aqui no xtibia! fora o fato de ter milhares de postagem sobre o mesmo conteudo na sessão de websites basta procurar! Link para o comentário Compartilhar em outros sites More sharing options...
Stigal 584 Postado Setembro 18, 2012 Share Postado Setembro 18, 2012 É um código pronto, não tem sentido ser movido para Aprovação de Tutoriais, moderação. Abraços. sim, deveria estar na seção websites.[2] gostei muito e realmente mt legal. da pra dar uma modificada e deixar o site "caracterisado <(*acho que escrevi errado)" com o site. Parabens ;3 Link para o comentário Compartilhar em outros sites More sharing options...
Critical 70 Postado Outubro 2, 2012 Share Postado Outubro 2, 2012 Olá XTibiano! Infelizmente, seu tutorial reprovado. Procure por ajuda na seção de como formular um bom tutorial. Grato pela atenção. Movido. Link para o comentário Compartilhar em outros sites More sharing options...
Posts Recomendados