Reputation: 31
I want an image to change every minute according to a user's clock. Moreover, I would like the image to be tied to a specific HH:MM. So when the computer moves from 3:00pm to 3:01pm ...back to 2:59pm, I would like the image to move from 0001.jpg to 0002.jpg....to 1440.jpg. Then have the process repeat with 3:00pm and 0001.jpg. The idea is that the sequence does not start over at 0001.jpg each time the user browses to the site.
I would like to know if:
Thank you,
tora
Upvotes: 0
Views: 894
Reputation: 3047
Here's how I'd approach it, in a nutshell:
Make sure your webserver is configured to send caching information so the browser doesn't have to load any image more than once for at least several days. 500k * 1440 = a lot of bandwidth.
Use javascript; every t minutes start a batch download and get the images you need for the next t minutes, storing them in an array.
Upvotes: 1
Reputation: 55210
1440 images is definitely not the way to approach this.
If you are into HTML5, http://ineedmoretime.org/ has a cool implementation.
It can be easily reproduced. ( Watch link at Chrome / Safari / Firefox as it needs SVG)
Created a fiddle for that: http://jsfiddle.net/naveen/kx5cT/
P.S: I am hot linking http://ineedmoretime.org/images/clock-background.png as of now in the javascript. Please place it in your on folder.
Upvotes: 0