Results 1 to 10 of 10

Thread: snow falling script - can i have multiple images, not just snowflakes?

  1. #1
    Join Date
    Jan 2009
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default snow falling script - can i have multiple images, not just snowflakes?

    Is it possible to have multiple images falling, ie snowflakes AND Christmas puddings??!!

    I am a complete novice at javascript....!

    Thanks

    Shona

  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    1,946
    Thanks
    16
    Thanked 304 Times in 303 Posts
    Blog Entries
    11

    Default

    Its an oldie, but maybe this - you can specify different images in the script array: http://www.dynamicdrive.com/dynamicindex3/leaves.htm

    Dont go too crazy with the number of images though or it can really slow things down.
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps |
    The only limit to creativity is imagination: JemCon.org

  3. #3
    Join Date
    Jan 2009
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Ah perfect! thanks! (how do i slow down the speed a little?!!) i have used three images, and they are whizzing down the page!

  4. #4
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    1,946
    Thanks
    16
    Thanked 304 Times in 303 Posts
    Blog Entries
    11

    Default

    See " setTimeout('fall()',20); " on one of the last lines?

    Change the value to about 40, like this;
    Code:
    setTimeout('fall()',40);
    I think a speed of 40-50 looks most "snowy".
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps |
    The only limit to creativity is imagination: JemCon.org

  5. #5
    Join Date
    Jan 2009
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    thanks! thats slowed it down a bit.

    I have copied it into the body of my index.html page now but it doesnt work! i just get the three images on top of one another in top left corner...! http://www.frasersauctionroom.co.uk/

  6. #6
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    1,946
    Thanks
    16
    Thanked 304 Times in 303 Posts
    Blog Entries
    11

    Default

    Have you sussed it?

    I just checked and its working fine in IE9, Chrome and Firefox.
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps |
    The only limit to creativity is imagination: JemCon.org

  7. #7
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    1,946
    Thanks
    16
    Thanked 304 Times in 303 Posts
    Blog Entries
    11

    Default

    My mistake - it looks like there is another 'pudding' script in there instead.

    Try taking that out and only using the slowed-down leaves one.
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps |
    The only limit to creativity is imagination: JemCon.org

  8. #8
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    1,946
    Thanks
    16
    Thanked 304 Times in 303 Posts
    Blog Entries
    11

    Default

    Scratch that - its down to the DOCTYPE.

    It looks like this old script wont work with valid DOCTYPES - just a <html> tag.
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps |
    The only limit to creativity is imagination: JemCon.org

  9. #9
    Join Date
    Jan 2009
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    i have used a completely different script, and have two different images falling now by amending this part:

    Code:
      for (i = 0; i < no; ++ i) {
      if(i % 2) {
        snowsrc="christmas-pudding.gif";
      } else {
        snowsrc="snow3.gif";
      }
    (someone else showed me how to though, i have no clue about javascript really!)
    Last edited by keyboard; 12-04-2012 at 09:19 PM. Reason: Format: Code Tags [code][/code]

  10. #10
    Join Date
    Jan 2011
    Location
    Southeastern CT
    Posts
    594
    Thanks
    43
    Thanked 28 Times in 28 Posts

    Default

    I just clicked on the link and it works fine for me using ff 16.0.2
    Thanks,

    Bud

Similar Threads

  1. Variation of Falling Snow Script
    By JBottero in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 01-26-2010, 04:41 AM
  2. Falling Snow
    By davids in forum Graphics
    Replies: 11
    Last Post: 12-07-2008, 02:11 PM
  3. Falling Snow Script Problem in Firefox v3.0.4
    By Kidcessory Haven in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 12-03-2008, 12:47 PM
  4. Snow falling script
    By cgfern in forum Dynamic Drive scripts help
    Replies: 4
    Last Post: 12-02-2007, 10:35 PM
  5. Falling Snow
    By TheVectra in forum Dynamic Drive scripts help
    Replies: 4
    Last Post: 11-15-2007, 10:10 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •