How to Pause/Play a GIF? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

How to Pause/Play a GIF?

I am working on a Timer, a little help is needed. I want the "Clock.gif" to pause on the exact Time. Please help me with this. (I have already tried the "1 running and 1 still image" thing.)

5th Mar 2017, 3:04 AM
Surya
Surya - avatar
8 Answers
+ 4
What kind of method? Is it problem to use a library for you?
5th Mar 2017, 6:38 AM
Patrik Sokol
Patrik Sokol - avatar
+ 4
I understand. What about a library? There are some which would solve that.
5th Mar 2017, 6:47 AM
Patrik Sokol
Patrik Sokol - avatar
+ 4
I've just got another idea. Why not to create your own clock?
5th Mar 2017, 6:54 AM
Patrik Sokol
Patrik Sokol - avatar
+ 3
Have you already found the solution?
5th Mar 2017, 6:12 AM
Patrik Sokol
Patrik Sokol - avatar
+ 3
Thank you for the Idea. I got It, I will split GIF to different Images. Then, I will use "setInterval()" and "clearinterval()" to animate the clock.
5th Mar 2017, 7:10 AM
Surya
Surya - avatar
+ 1
I used a still Image, which is then replaced by the GIF, which makes the clock move. But, i want the clock to pause in the exact angle, when User HITS "Pause" button.
5th Mar 2017, 6:45 AM
Surya
Surya - avatar
0
No, I have tried another method. Which is not very praisable.
5th Mar 2017, 6:36 AM
Surya
Surya - avatar
0
Which Library are you referring?
5th Mar 2017, 6:49 AM
Surya
Surya - avatar