Flocos de neve

4 participantes

Ver o tópico anterior Ver o tópico seguinte Ir para baixo

Tópico resolvido Flocos de neve

Mensagem por DarkCode 21.12.11 19:59

Qual é minha questão:
Boas!

Tenho este codigo de flocos de neve:
Código:
<!-- Flocos 3D -->

<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
* Last updated Nov 9th, 05' by DD. This notice must stay intact for use
******************************************/

//Configure below to change URL path to the snow image
var snowsrc="http://img42.imageshack.us/img42/9580/snow31qj.gif"
// Configure below to change number of snow to render
var no = 10;
// Configure whether snow should disappear after x seconds (0=never):
var hidesnowtime = 0;
// Configure how much snow should drop down before fading ("windowheight" or "pageheight")
var snowdistance = "pageheight";

///////////Stop Config//////////////////////////////////

var ie4up = (document.all) ? 1 : 0;
var ns6up = (document.getElementById&&!document.all) ? 1 : 0;

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

var dx, xp, yp; // coordinate and position variables
var am, stx, sty; // amplitude and step variables
var i, doc_width = 800, doc_height = 600;

if (ns6up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
} else if (ie4up) {
doc_width = iecompattest().clientWidth;
doc_height = iecompattest().clientHeight;
}

dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();
snowsrc=(snowsrc.indexOf("dynamicdrive.com")!=-1)? "snow.gif" : snowsrc
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 (ie4up||ns6up) {
if (i == 0) {
document.write("<div
id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +";
VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><a
href=\"http://dynamicdrive.com\"><img src='"+snowsrc+"'
border=\"0\"><\/a><\/div>");
} else {
document.write("<div
id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +";
VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img
src='"+snowsrc+"' border=\"0\"><\/div>");
}
}
}

function snowIE_NS6() { // IE and NS6 main animation function
doc_width = ns6up?window.innerWidth-10 : iecompattest().clientWidth-10;
doc_height=(window.innerHeight
&& snowdistance=="windowheight")? window.innerHeight : (ie4up
&& snowdistance=="windowheight")? iecompattest().clientHeight :
(ie4up && !window.opera && snowdistance=="pageheight")?
iecompattest().scrollHeight : iecompattest().offsetHeight;
for (i = 0; i < no; ++ i) { // iterate for every 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("snowIE_NS6()", 10);
}

function hidesnow(){
if (window.snowtimer) clearTimeout(snowtimer)
for (i=0; i<no; i++) document.getElementById("dot"+i).style.visibility="hidden"
}


if (ie4up||ns6up){
snowIE_NS6();
if (hidesnowtime>0)
setTimeout("hidesnow()", hidesnowtime*1000)
}

</script>

<!-- Fim de Edição -->








<div
id="snow" style="font-family: comic sans ms,arial,times new roman;
color: rgb(204, 204, 204); font-weight: bold; font-style: normal;
background-color: transparent; z-index: 2;"><marquee
behavior="scroll" direction="down" scrollamount="3" style="position:
absolute; left: 120px; top: 50px; width: 8px; height:
850px;"><b>°</b></marquee><marquee
behavior="scroll" direction="down" scrollamount="4" style="position:
absolute; left: 170px; top: 70px; width: 8px; height:
700px;"><b>°</b></marquee><marquee
behavior="scroll" direction="down" scrollamount="5" style="position:
absolute; left: 220px; top: 90px; width: 8px; height:
650px;"><b>°</b></marquee><marquee
behavior="scroll" direction="down" scrollamount="6" style="position:
absolute; left: 270px; top: 30px; width: 8px; height:
770px;"><b>°</b></marquee><marquee
behavior="scroll" direction="down" scrollamount="7" style="position:
absolute; left: 320px; top: 30px; width: 8px; height:
740px;"><b>°</b></marquee><marquee
behavior="scroll" direction="down" scrollamount="2" style="position:
absolute; left: 240px; top: 30px; width: 8px; height:
470px;"><b>°</b></marquee><marquee
behavior="scroll" direction="down" scrollamount="3" style="position:
absolute; left: 140px; top: 30px; width: 8px; height:
500px;"><b>°</b></marquee><marquee
behavior="scroll" direction="down" scrollamount="2" style="position:
absolute; left: 290px; top: 30px; width: 8px; height:
460px;"><b>°</b></marquee><marquee
behavior="scroll" direction="down" scrollamount="3" style="position:
absolute; left: 100px; top: 130px; width: 8px; height:
480px;"><b>°</b></marquee><marquee
behavior="scroll" direction="down" scrollamount="2" style="position:
absolute; left: 360px; top: 30px; width: 8px; height:
730px;"><b>°</b></marquee><marquee
behavior="scroll" direction="down" scrollamount="3" style="position:
absolute; left: 390px; top: 50px; width: 8px; height:
800px;"><b>°</b></marquee><marquee
behavior="scroll" direction="down" scrollamount="4" style="position:
absolute; left: 440px; top: 70px; width: 8px; height:
700px;"><b>°</b></marquee><marquee
behavior="scroll" direction="down" scrollamount="2" style="position:
absolute; left: 470px; top: 100px; width: 8px; height:
700px;"><b>°</b></marquee><marquee
behavior="scroll" direction="down" scrollamount="4" style="position:
absolute; left: 560px; top: 70px; width: 8px; height:
700px;"><b>°</b></marquee><marquee
behavior="scroll" direction="down" scrollamount="2" style="position:
absolute; left: 590px; top: 100px; width: 8px; height:
700px;"><b>°</b></marquee><marquee
behavior="scroll" direction="down" scrollamount="4" style="position:
absolute; left: 520px; top: 170px; width: 8px; height:
700px;"><b>°</b></marquee><marquee
behavior="scroll" direction="down" scrollamount="2" style="position:
absolute; left: 610px; top: 200px; width: 8px; height:
700px;"><b>°</b></marquee><marquee
behavior="scroll" direction="down" scrollamount="3" style="position:
absolute; left: 650px; top: 250px; width: 8px; height:
740px;"><b>°</b></marquee><marquee
behavior="scroll" direction="down" scrollamount="2" style="position:
absolute; left: 690px; top: 290px; width: 8px; height:
780px;"><b>°</b></marquee><marquee
behavior="scroll" direction="down" scrollamount="3" style="position:
absolute; left: 660px; top: 40px; width: 8px; height:
470px;"><b>°</b></marquee><marquee
behavior="scroll" direction="down" scrollamount="2" style="position:
absolute; left: 690px; top: 60px; width: 8px; height:
490px;"><b>°</b></marquee></div>

<strong>Codigo Flocos [b][b]Neve[/b][/b] Grandes</strong>:

<marquee
style="position: absolute; left: 120px; top: 50px; width: 25px; height:
450px;" scrollamount="3" direction="down" behavior="scroll"><img
src="http://profilecodeskit.com/images/snow.gif" /></marquee>
<marquee style="position: absolute; left: 170px; top: 70px; width:
25px; height: 300px;" scrollamount="4" direction="down"
behavior="scroll"><img
src="http://profilecodeskit.com/images/snow.gif" /></marquee>
<marquee style="position: absolute; left: 220px; top: 90px; width:
25px; height: 250px;" scrollamount="5" direction="down"
behavior="scroll"><img
src="http://profilecodeskit.com/images/snow.gif" /></marquee>
<marquee style="position: absolute; left: 270px; top: 30px; width:
25px; height: 370px;" scrollamount="6" direction="down"
behavior="scroll"><img
src="http://profilecodeskit.com/images/snow.gif" /></marquee>
<marquee style="position: absolute; left: 320px; top: 30px; width:
25px; height: 340px;" scrollamount="7" direction="down"
behavior="scroll"><img
src="http://profilecodeskit.com/images/snow.gif" /></marquee>
<marquee style="position: absolute; left: 240px; top: 30px; width:
25px; height: 70px;" scrollamount="2" direction="down"
behavior="scroll"><img
src="http://profilecodeskit.com/images/snow.gif" /></marquee>
<marquee style="position: absolute; left: 250px; top: 30px; width:
25px; height: 50px;" scrollamount="3" direction="down"
behavior="scroll"><img
src="http://profilecodeskit.com/images/snow.gif" /></marquee>
<marquee style="position: absolute; left: 290px; top: 30px; width:
25px; height: 60px;" scrollamount="2" direction="down"
behavior="scroll"><img
src="http://profilecodeskit.com/images/snow.gif" /></marquee>
<marquee style="position: absolute; left: 100px; top: 130px; width:
25px; height: 80px;" scrollamount="3" direction="down"
behavior="scroll"><img
src="http://profilecodeskit.com/images/snow.gif" /></marquee>
<marquee style="position: absolute; left: 360px; top: 30px; width:
25px; height: 330px;" scrollamount="2" direction="down"
behavior="scroll"><img
src="http://profilecodeskit.com/images/snow.gif" /></marquee>
<marquee style="position: absolute; left: 390px; top: 50px; width:
25px; height: 400px;" scrollamount="3" direction="down"
behavior="scroll"><img
src="http://profilecodeskit.com/images/snow.gif" /></marquee>
<marquee style="position: absolute; left: 440px; top: 70px; width:
25px; height: 300px;" scrollamount="4" direction="down"
behavior="scroll"><img
src="http://profilecodeskit.com/images/snow.gif" /></marquee>
<marquee style="position: absolute; left: 470px; top: 100px; width:
25px; height: 300px;" scrollamount="2" direction="down"
behavior="scroll"><img
src="http://profilecodeskit.com/images/snow.gif" /></marquee>
<marquee style="position: absolute; left: 560px; top: 70px; width:
25px; height: 300px;" scrollamount="4" direction="down"
behavior="scroll"><img
src="http://profilecodeskit.com/images/snow.gif" /></marquee>
<marquee style="position: absolute; left: 590px; top: 100px; width:
25px; height: 300px;" scrollamount="2" direction="down"
behavior="scroll"><img
src="http://profilecodeskit.com/images/snow.gif" /></marquee>
<marquee style="position: absolute; left: 520px; top: 170px; width:
25px; height: 300px;" scrollamount="4" direction="down"
behavior="scroll"><img
src="http://profilecodeskit.com/images/snow.gif" /></marquee>
<marquee style="position: absolute; left: 610px; top: 200px; width:
25px; height: 300px;" scrollamount="2" direction="down"
behavior="scroll"><img
src="http://profilecodeskit.com/images/snow.gif" /></marquee>
<marquee style="position: absolute; left: 650px; top: 250px; width:
25px; height: 340px;" scrollamount="3" direction="down"
behavior="scroll"><img
src="http://profilecodeskit.com/images/snow.gif"
/></marquee><marquee style="position: absolute; left:
690px; top: 290px; width: 25px; height: 380px;" scrollamount="2"
direction="down" behavior="scroll"><marquee style="position:
absolute; left: 660px; top: 40px; width: 25px; height: 70px;"
scrollamount="3" direction="down" behavior="scroll"><img
src="http://profilecodeskit.com/images/snow.gif"
/></marquee><a
href="http://profilecodeskit.com/graphics/snow/"><br
/></a></marquee>

Mas quando coloco na home page, a pagina fica desconfigurada em baixo e os flocos de neve só aparece num lado do forum, há como resolver isso?
Quero em os flocos a cair no ecra todo do fórum e de preferencia ate ao final do fórum e tambem quero que a pagina nao fique desconfigurada em baixo.

Cumps

Medidas que eu tomei para corrigir o problema:
Pesquisa

Imagens do meu problema:


Endereço do meu fórum:
http://www.netganza.com

Versão do meu fórum:
DarkCode

DarkCode
Super Membro

Membro desde : 24/02/2008
Mensagens : 1188
Pontos : 1591

http://www.forumjovem.com

Ir para o topo Ir para baixo

Membro Entusiasta

Tópico resolvido Re: Flocos de neve

Mensagem por Ace 21.12.11 20:03

Olá,

Você seguiu todos os passos do tutorial?

Flecha ajudeiros https://ajuda.forumeiros.com/t22241-tutorial-neve-cair-sobre-o-forum

Se sim, poderia nos informar se colocou corretamente na descrição de seu fórum o link de referência para a página HTML criada?

Até Mais!
Ace

Ace
Membro Entusiasta
Membro Entusiasta

Membro desde : 06/07/2011
Mensagens : 8881
Pontos : 11607

https://ajuda.forumeiros.com

Ir para o topo Ir para baixo

Tópico resolvido Re: Flocos de neve

Mensagem por Nickname 21.12.11 20:06

Olá
Coloque esse codigo no seguinte Local

Painel de Controle >> Geral >> Forum >> Configuração >> Descrição do Site

<script src=http://astuforum.free.fr/js/neige-mini.js></script>

Se Não Funcionar Avise-Me
Nickname

Nickname
Super Membro

Membro desde : 13/11/2011
Mensagens : 1553
Pontos : 2049

https://ajuda.forumeiros.com

Ir para o topo Ir para baixo

Tópico resolvido Re: Flocos de neve

Mensagem por DarkCode 21.12.11 20:13

Olá de novo!

G@BRIELZINHØ funicona perfeitamente, mas quero é os flocos em bolinha que deixei na abertura do topico, tem como por?
DarkCode

DarkCode
Super Membro

Membro desde : 24/02/2008
Mensagens : 1188
Pontos : 1591

http://www.forumjovem.com

Ir para o topo Ir para baixo

  • 0

Tópico resolvido Re: Flocos de neve

Mensagem por Lucas2122 21.12.11 20:15

Código:
/******************************************
* Snow Effect Script- By Altan d.o.o. (http://www.altan.hr/snow/index.html)
******************************************/

//Localização da imagem do floco de neve
var snowsrc="http://astuforum.free.fr/images/neige-mini.gif"
// Quantidade de flocos de neve na tela
var no = 20;
// Configure whether snow should disappear after x seconds (0=never):
var hidesnowtime = 50;
// Configure how much snow should drop down before fading ("windowheight" or "pageheight")
var snowdistance = "pageheight";

///////////Stop Config//////////////////////////////////

var ie4up = (document.all) ? 1 : 0;
var ns6up = (document.getElementById&&!document.all) ? 1 : 0;

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

var dx, xp, yp; // coordinate and position variables
var am, stx, sty; // amplitude and step variables
var i, doc_width = 800, doc_height = 600;

if (ns6up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
} else if (ie4up) {
doc_width = iecompattest().clientWidth;
doc_height = iecompattest().clientHeight;
}

dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();
snowsrc=(snowsrc.indexOf("dynamicdrive.com")!=-1)? "snow.gif" : snowsrc
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 (ie4up||ns6up) {
if (i == 0) {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><a href=\"http://dynamicdrive.com\"><img src='"+snowsrc+"' border=\"0\"><\/a><\/div>");
} else {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img src='"+snowsrc+"' border=\"0\"><\/div>");
}
}
}

function snowIE_NS6() { // IE and NS6 main animation function
doc_width = ns6up?window.innerWidth-10 : iecompattest().clientWidth-10;
doc_height=(window.innerHeight && snowdistance=="windowheight")? window.innerHeight : (ie4up && snowdistance=="windowheight")? iecompattest().clientHeight : (ie4up && !window.opera && snowdistance=="pageheight")? iecompattest().scrollHeight : iecompattest().offsetHeight;
for (i = 0; i < no; ++ i) { // iterate for every 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("snowIE_NS6()", 10);
}

function hidesnow(){
if (window.snowtimer) clearTimeout(snowtimer)
for (i=0; i<no; i++) document.getElementById("dot"+i).style.visibility="hidden"
}


if (ie4up||ns6up){
snowIE_NS6();
if (hidesnowtime>0)
setTimeout("hidesnow()", hidesnowtime*1000)
}


Painel de controle -> Módulos -> HTML -> Gestão das páginas HTML

Copie o "ENDERECO-DA-PAGINA-HTML"
Vá em Painel de Controle -> Geral -> Fórum -> Configurações>Descrição do Site cple o seguinte codigo

Código:
<script src="ENDERECO-DA-PAGINA-HTML"></script>

Modifique o campo "ENDERECO-DA-PAGINA-HTML" por o endereço da pagina HTML
Lucas2122

Lucas2122
Membro

Membro desde : 17/08/2011
Mensagens : 774
Pontos : 1348

http://moldentec.forumeiros.com/forum

Ir para o topo Ir para baixo

Tópico resolvido Re: Flocos de neve

Mensagem por DarkCode 21.12.11 20:22

Olá!

Eu já resolvi o problema, obrigado na mesma Feliz
DarkCode

DarkCode
Super Membro

Membro desde : 24/02/2008
Mensagens : 1188
Pontos : 1591

http://www.forumjovem.com

Ir para o topo Ir para baixo

Ver o tópico anterior Ver o tópico seguinte Ir para o topo

- Tópicos semelhantes

Permissões neste sub-fórum
Não podes responder a tópicos