SMF For Free Support Forum
Signup For Free Forum
December 04, 2008, 08:39:16 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to SMF For Free. The best free SMF Host
 
   Home   Help Search Arcade Gallery Login Register  

Pages: 1 [2] 3
  Print  
Author Topic: [Code] Pictures Falling Down the Page  (Read 4080 times)
0 Members and 1 Guest are viewing this topic.
Adds
SMF For Free Full Member
*
Offline Offline

Posts: 177


Press alt + F4


View Profile WWW
« Reply #15 on: December 09, 2006, 08:50:34 pm »

Hes the leaf one c7c made for me

Code:
<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://img162.imageshack.us/img162/647/leafaddsnq4.gif"
  // Configure below to change number of snow to render
  var no = 9;
  // 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>
Logged


GREAT DEALS ON CRUISES & ISLAND GETAWAYS At tru-healthtravel.com
Molly
SMF For Free Full Member
*
Offline Offline

Posts: 142



View Profile WWW
« Reply #16 on: August 09, 2007, 03:58:10 am »

OH WOW! I love it...and the graphic is one that Sibyl modified for me...woo hoo! Thanks a bunch. It is awesome.
Logged

LaundryLady
Global Moderator
*
Offline Offline

Posts: 3083


Multi-Tasking Maven


View Profile
« Reply #17 on: August 09, 2007, 11:45:27 am »

I just tried this on my test server.  Maybe falling Ghosts?  LOL.  Tried it and it works good.


I found another one that allows multiple images and it works but it goes up instead of down.  Sigh, I have a request into Agent Moose to take a look at it. 
« Last Edit: August 09, 2007, 12:46:33 pm by LaundryLady » Logged
mom
SMF For Free Member
*
Offline Offline

Posts: 56


PogoBabies


View Profile WWW
« Reply #18 on: January 08, 2008, 05:38:50 pm »

Forum Url: http://pogobabies.smfforfree3.com
This last code worked for me, too!  Thank you so much!  I have widdle snowflakes now!   smitten
Logged

I am strong...so bring it on!
caillea
SMF For Free Sponsors
*
Offline Offline

Posts: 16


I may roar but I don't bite


View Profile WWW
« Reply #19 on: January 28, 2008, 08:03:43 am »

Thanks Adds.. It work for me and I changed the leaf to hearts for Val. to go with my theme
Logged

Click here it will take you to "The Hideaway"
Jessie
SMF For Free Hero
*
Offline Offline

Posts: 551


"Keep your friends close and your enemies closer."


View Profile
« Reply #20 on: April 18, 2008, 08:12:57 pm »

chiq it might be your internet some codes dont work for some internets
Logged



`Before you post always ask yourself WWJD. What Would Jessie do?`
LaundryLady
Global Moderator
*
Offline Offline

Posts: 3083


Multi-Tasking Maven


View Profile
« Reply #21 on: April 19, 2008, 05:39:00 am »

I think you might have meant browsers, hun.  Firefox, IE 6, IE 7, Opera, Netscape, K-Meleon and there are more I am sure all can show the same codes differently.

The falling code seems to be the hardest one to get to work on the different browsers. 
Logged
Raven78
SMF For Free Newbie
*
Offline Offline

Posts: 14



View Profile
« Reply #22 on: May 18, 2008, 11:50:51 pm »

Love this!!^^
Logged
clairebear
SMF For Free Hero
*
Offline Offline

Posts: 516


View Profile
« Reply #23 on: May 29, 2008, 11:35:54 am »

whered o this code go?? footer? header?
Logged


clairebear
SMF For Free Hero
*
Offline Offline

Posts: 516


View Profile
« Reply #24 on: May 29, 2008, 11:44:33 am »

this is all good n works great!!
tho i want a feather to drop down my foeum i have one yet it has a white background so i have a white rectangle going down lol
anyone know of a tranparent pic of a feather?
Logged


LaundryLady
Global Moderator
*
Offline Offline

Posts: 3083


Multi-Tasking Maven


View Profile
« Reply #25 on: May 29, 2008, 12:28:19 pm »

Answered you in your other request post.  Please only request in one thread to avoid confusion.
Logged
clairebear
SMF For Free Hero
*
Offline Offline

Posts: 516


View Profile
« Reply #26 on: May 29, 2008, 12:40:55 pm »

sorry  uglystupid2
Logged


clairebear
SMF For Free Hero
*
Offline Offline

Posts: 516


View Profile
« Reply #27 on: May 29, 2008, 12:50:50 pm »

Code:
<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://i102.photobucket.com/albums/m102/clairediz/32617786.gif"
  // Configure below to change number of snow to render
  var no = 1;
  // 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>

I cant get this to work anyone see why?
Logged


clairebear
SMF For Free Hero
*
Offline Offline

Posts: 516


View Profile
« Reply #28 on: May 29, 2008, 12:58:22 pm »

i cant see it but my mate can hmmmm
Logged


LaundryLady
Global Moderator
*
Offline Offline

Posts: 3083


Multi-Tasking Maven


View Profile
« Reply #29 on: May 29, 2008, 01:01:03 pm »

Probably browser specific.  Are you both using the same style browser?

Logged


Pages: 1 [2] 3
  Print  
 
Jump to:  

cheap low cost web hosting reviews

Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
ServerBeach Coupon
Page created in 0.645 seconds with 17 queries.