Invité Invité

 | Sujet: Neige Sam 15 Déc 2007, 16:24 | |
| Bonjour. J'espère être dans la bonne catégorie...
http://board.ogame.fr/index.php (Image : http://stuff.dragons-network.de/ogame/snowscript/schnee.gif)
Puis-je avoir le même effet de neige qui tombe ? A intégrer dans mon forum http://lyoko.top-forum.net/ndex.htm
Merci d'avance. |
|
Invité Invité

 | Sujet: Re: Neige Sam 15 Déc 2007, 16:24 | |
| Finalement, j'ai trouvé. | Spoiler: | | | <script type="text/javascript">
/****************************************** * Snow Effect Script- By Altan d.o.o. (http://www.altan.hr/snow/index.html) * Visit Dynamic Drive DHTML code library (http://www.dynamicdrive.com/) for full source code * Traduction française par Prof TNJ ******************************************/ // Indiquer l'URL de l'image du flocon : var urlflocon="http://i24.servimg.com/u/f24/11/34/80/05/snow3110.gif" // Ecrire le nombre de flocons : var nombreflocons = 25; // Indiquer si la neige doit disparaître après x secondes (0=jamais) : var cacherflocons = 0; // Indiquer si la neige doit être vue sur la fenêtre ou toute la page avant de disparaître ("windowheight"=la fenêtre, "pageheight"=toute la page) var voirflocons = "pageheight";
/////////// FIN DE LA PARTIE CONFIGURATION //////////////////////////////////
var ie4up = (document.all) ? 1 : 0; var ns6up = (document.getElementById&&!document.all) ? 1 : 0;
function testIEcompatible(){ return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body }
var dx, xp, yp; // Variables de coordonnées et de position var am, stx, sty; // Variables d'amplitude var i, doc_width = 1024, doc_height = 768; // Taille de l'écran if (ns6up) { doc_width = self.innerWidth; doc_height = self.innerHeight; } else if (ie4up) { doc_width = testIEcompatible().clientWidth; doc_height = testIEcompatible().clientHeight; }
dx = new Array(); xp = new Array(); yp = new Array(); am = new Array(); stx = new Array(); sty = new Array();
for (i = 0; i < nombreflocons; ++ i) { dx[i] = 0; // Variables de coordonnées xp[i] = Math.random()*(doc_width-50); // Variables de position yp[i] = Math.random()*doc_height; am[i] = Math.random()*20; // Variables d'amplitude stx[i] = 0.02 + Math.random()/10; // Variables de pas sty[i] = 0.7 + Math.random(); // Variables de pas if (ie4up||ns6up) { if (i == 0) { document.write(" } else { document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img src='"+urlflocon+"' border=\"0\"><\/div>"); } } }
function neigeIE_NS6() { // IE et NS6 : fonctions principales d'animation doc_width = ns6up?window.innerWidth-10 : testIEcompatible().clientWidth-10; doc_height=(window.innerHeight && voirflocons=="windowheight")? window.innerHeight : (ie4up && voirflocons=="windowheight")? testIEcompatible().clientHeight : (ie4up && !window.opera && voirflocons=="pageheight")? testIEcompatible().scrollHeight : testIEcompatible().offsetHeight; for (i = 0; i < nombreflocons; ++ i) { // déplacement pour chaque point ("dot") 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(); } dx[i] += stx[i]; document.getElementById("dot"+i).style.top=yp[i]+"px"; document.getElementById("dot"+i).style.left=xp[i] + am[i]*Math.sin(dx[i])+"px"; } snowtimer=setTimeout("neigeIE_NS6()", 10); }
function cacherneige(){ if (window.snowtimer) clearTimeout(snowtimer) for (i=0; i<nombreflocons; i++) document.getElementById("dot"+i).style.visibility="hidden" }
if (ie4up||ns6up){ neigeIE_NS6(); if (cacherflocons>0) setTimeout("cacherneige()", cacherflocons*1000) }
</script>
|
|
|
miniden71 Staff

 Nombre de messages: 908 Logiciel : Photoshop CS5 Réputation: 10 Points: 144 Date d'inscription: 05/09/2005
Détails sur le membre Logiciel principal: Aucun Ma disponibilité: toujours disponible Spécialités graphiques: Signature
 | Sujet: Re: Neige Sam 15 Déc 2007, 18:16 | |
| de plus cette question a déjà été poster  Merci Haby | V  (__/) (_'.'_) ('')_('')  |
|
Feiyue Ange assidu

 Nombre de messages: 162 Logiciel : 19 ans Réputation: 0 Points: 0 Date d'inscription: 15/10/2007
Détails sur le membre Logiciel principal: Aucun Ma disponibilité: Tous les Soirs ^^ Spécialités graphiques: Création template
 | Sujet: Re: Neige Sam 15 Déc 2007, 23:12 | |
| Bonsoir,
c'est pas de l'intégration, c'est juste un script :oooPS:
A déplacer s'il vous plaît les Modos ^^"
Merkii |
|