Hello, I am trying to find the simplest way to replicate a 12fps animation using CSS sprites and jQuery.
I was thinking using the setInterval() so every 83.33 millisecond, the next sprite will be loaded.
My problem, is that I don't know how to do that...
I was thinking, because my sprite names are incremental like:
mariohammerswing1.png
mariohammerswing2.png
mariohammerswing3.png
etc.
So, if we could somehow increment this until we reached the last instance, which in this case is mariohammerswing5.png
it will loop back to the beginning.
If I can figure out that part, I'm ready to go! :)
Any suggestions?