Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 2 of 2 FirstFirst 12
Results 16 to 20 of 20
  1. #16
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,642
    Thanks
    0
    Thanked 649 Times in 639 Posts
    http://www.felgall.com/jstip88.htm has my variant of a falling snow script - the last line allows you to specify as many images as you like as well as how many flakes to display at once..

    If you only want it to run between the selected months then just add the following to the front of the script:

    Code:
    var date = new Date;
    var month = date.getMonth( ) + 1;
    if ((month <=3) || (month >= 6))
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  2. #17
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,310
    Thanks
    203
    Thanked 2,563 Times in 2,541 Posts
    @felgall - I have looked at your snowflakes script but in IE10 and GC the flakes fall in a very unrealistic manner, jumping down, sideways and even upwards instead of smoothly drifting down. Perhaps it needs another revision.

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.

  3. #18
    New to the CF scene
    Join Date
    Aug 2013
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    @Old Pedant
    Nice! Thanks for your script and for great help with the timing.
    Now it is working

    @felgal - Thank you too.

  4. #19
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    27,664
    Thanks
    80
    Thanked 4,641 Times in 4,603 Posts
    Agree with Philip, Felgall. Doesn't look or act like snow. Just kind of a drunkard's walk on each flake, instead of like falling snow. Also, I think it would help to change the opacity of the flakes, so that you can still read the text through them. Oh, and it looks the same in Firefox, as well as MSIE and Chrome.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  5. #20
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    27,664
    Thanks
    80
    Thanked 4,641 Times in 4,603 Posts
    Well, gee, I just figured out why Felgall's snow doesn't look like snow!

    He's never seen snow. After all he lives in the land of Oz where it's never really winter. <grin/>
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


 
Page 2 of 2 FirstFirst 12

Posting Permissions

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