Jump to content
Fórum Script Brasil
  • 0

Efeito De Neve No Dreamweaver


Guest Junior Goulart

Question

Guest Junior Goulart

ola, pessoal,

alguém sabe me dizer como fazer aquele efeito de neve caindo no dreamweaver, tipo caindo no topo do site ate embaixo....

... e q eu vi isso em um site e achei maneiro.... alguém poderia me dar uma ajuda nesse tópico.

atenciosamente,

Junior Goulart

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

show de bola esse "JAVA SCRIPT",

segue o codigo que peguei no seu site, muito bom p se usar essa epoca do ano....fui!

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<title>Documento sem t&iacute;tulo</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<script language="JavaScript" type="text/JavaScript">

<!--

function MM_initTimelines() { //v4.0

    //MM_initTimelines() Copyright 1997 Macromedia, Inc. All rights reserved.

    var ns = navigator.appName == "Netscape";

    var ns4 = (ns && parseInt(navigator.appVersion) == 4);

    var ns5 = (ns && parseInt(navigator.appVersion) > 4);

    document.MM_Time = new Array(1);

    document.MM_Time[0]= new Array(0);

    document.MM_Time["Timeline1"] = document.MM_Time[0];

    document.MM_Time[0].MM_Name = "Timeline1";

    document.MM_Time[0].fps = 15;

    document.MM_Time[0].lastFrame = 0;

    for (i=0; i<document.MM_Time.length; i++) {

        document.MM_Time.ID = null;

        document.MM_Time.curFrame = 0;

        document.MM_Time.delay = 1000/document.MM_Time.fps;

    }

}

//-->

</script></head>

<BODY bgColor=#000000 onload="MM_timelinePlay('Timeline1')"><TABLE width="100%" bgColor=#cccccc>

<TBODY>

    <TR>

      <TD width="741" height="134" valign="top"> <TABLE width="100%">

          <TBODY>

            <TR>

             

          <TD width="49%">

            <script language=JavaScript1.2>

<!-- Begin

var no = 15; // snow number

var speed = 1; // smaller number moves the snow faster

var snowflake = "imagens/neve.gif";

var ns4up = (document.layers) ? 1 : 0; // browser sniffer

var ie4up = (document.all) ? 1 : 0;

var dx, xp, yp; // coordinate and position variables

var am, stx, sty; // amplitude and step variables

var i, doc_width = 1500, doc_height = 1500;

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 = 0; // set coordinate variables

xp = Math.random()*(doc_width-50); // set position variables

yp = Math.random()*doc_height;

am = Math.random()*20; // set amplitude variables

stx = 0.02 + Math.random()/10; // set step variables

sty = 0.7 + Math.random(); // set step variables

if (ns4up) { // set layers

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=\"");

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() { // Netscape main animation function

for (i = 0; i < no; ++ i) { // iterate for every dot

yp += sty;

if (yp > doc_height-50) {

xp = Math.random()*(doc_width-am-30);

yp = 0;

stx = 0.02 + Math.random()/10;

sty = 0.7 + Math.random();

doc_width = self.innerWidth;

doc_height = self.innerHeight;

}

dx += stx;

document.layers["dot"+i].top = yp;

document.layers["dot"+i].left = xp + am*Math.sin(dx);

}

setTimeout("snowNS()", speed);

}

function snowIE() { // IE main animation function

for (i = 0; i < no; ++ i) { // iterate for every dot

yp += sty;

if (yp > doc_height-50) {

xp = Math.random()*(doc_width-am-30);

yp = 0;

stx = 0.02 + Math.random()/10;

sty = 0.7 + Math.random();

doc_width = document.body.clientWidth;

doc_height = document.body.clientHeight;

}

dx += stx;

document.all["dot"+i].style.pixelTop = yp;

document.all["dot"+i].style.pixelLeft = xp + am*Math.sin(dx);

}

setTimeout("snowIE()", speed);

}

if (ns4up) {

snowNS();

} else if (ie4up) {

snowIE();

}

// End -->

</SCRIPT> </TD>

              <TD width="51%"> <DIV align=center>

<body>

</body>

</html>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152.2k
    • Total Posts
      652.1k
×
×
  • Create New...