Pausing a GIF animation on mouse-click or hover |
Pausing a GIF animation on mouse-click or hover |
dsmith916 |
Dec 13 2013, 02:38 PM
Post
#1
|
Advanced Member Group: Members Posts: 162 Joined: 5-December 12 Member No.: 18,203 |
I'm trying to stop a GIF animation when someone hovers over it but the closest thing I've found is how to start the animation on mouse-over here: http://stackoverflow.com/questions/7473117...-a-gif-on-hover
My problem with this is it uses an alternate file for the paused frame which is fine for certain purposes but not what I want to do. I want the user to be able to pause the animation on any frame they want simply by placing their mouse over the GIF while it's playing. |
Christian J |
Dec 13 2013, 02:54 PM
Post
#2
|
. Group: WDG Moderators Posts: 9,630 Joined: 10-August 06 Member No.: 7 |
My browser doesn't allow GIF animations in the first place...
|
dsmith916 |
Dec 13 2013, 02:57 PM
Post
#3
|
Advanced Member Group: Members Posts: 162 Joined: 5-December 12 Member No.: 18,203 |
|
Christian J |
Dec 13 2013, 03:58 PM
Post
#4
|
. Group: WDG Moderators Posts: 9,630 Joined: 10-August 06 Member No.: 7 |
In Opera (the real Opera, before the current Blink-based disaster) it's a setting in Preferences. I'd go nuts without it.
IE has a setting tucked away in the Tools > Preferences > Advanced tab. Firefox hides its setting in about:config for some reason: http://kb.mozillazine.org/Firefox_:_Tips_:_Animated_Images Chrome (being useless as always) may require extensions to stop it, but I haven't tried. |
Christian J |
Dec 13 2013, 04:24 PM
Post
#5
|
. Group: WDG Moderators Posts: 9,630 Joined: 10-August 06 Member No.: 7 |
I want the user to be able to pause the animation on any frame they want simply by placing their mouse over the GIF while it's playing. No idea if you can do that with animated GIFs. As a workaround (depending on the nature of the animation) you might use a fast slideshow with static images. |
dsmith916 |
Dec 13 2013, 05:31 PM
Post
#6
|
Advanced Member Group: Members Posts: 162 Joined: 5-December 12 Member No.: 18,203 |
I want the user to be able to pause the animation on any frame they want simply by placing their mouse over the GIF while it's playing. I can't believe no one has done this before. I can think of so many good reasons you'd want to pause a GIF and continue it. I can't imagine there isn't some relatively easy way to do it. I've found a thousand how-to's on making them play on mouse-over but nothing else. They always 'pause' on the first frame when you take your mouse off too which is good for some purposes but why wouldn't someone want to pause it on the current frame and then continue to get a closer look at a frame of the GIF? It would be great for analyzing motion for example skateboarding tricks or car crashes or scientific time-lapse applications. I find it really hard to believe there's no way to script the pausing and playing of a GIF without restarting it from the beginning. |
pandy |
Dec 13 2013, 05:34 PM
Post
#7
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,716 Joined: 9-August 06 Member No.: 6 |
They have. Top of Google: http://freezeframe.chrisantonellis.com/ .
|
dsmith916 |
Dec 15 2013, 06:09 PM
Post
#8
|
Advanced Member Group: Members Posts: 162 Joined: 5-December 12 Member No.: 18,203 |
Read more carefully - that is the exact opposite of what I want to do. I want to have the gif play automatically and STOP on mouse over. Also that link is just like every other tutorial: it stops on the first frame not on the current frame. There are thousands of tutorials on how to make a GIF start on mouse-hover and when the mouse isn't over it go back to the first frame of the GIF (or sometimes a user defined image) but that is not what I want. I want the exact opposite. I am trying to make the GIF stop on mouse-hover and stop on the current frame of the GIF, and continue playing from that frame when the mouse is no longer hovering over the image. |
pandy |
Dec 15 2013, 09:34 PM
Post
#9
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,716 Joined: 9-August 06 Member No.: 6 |
I'm pointing out that it's possible to stop the animation. As I understand it the script does that, but not when you want. Do some research and don't expect ready cookie cutter solutions all the time.
|
dsmith916 |
Dec 16 2013, 05:27 AM
Post
#10
|
Advanced Member Group: Members Posts: 162 Joined: 5-December 12 Member No.: 18,203 |
I'm pointing out that it's possible to stop the animation. As I understand it the script does that, but not when you want. Do some research and don't expect ready cookie cutter solutions all the time. I don't. I just find it very hard to believe that this is something no one has done before or knows how to do, which is how it seems. Maybe it's impossible? I find that very hard to believe too, that you can't just pause and play GIF animation. |
dsmith916 |
Dec 16 2013, 05:33 AM
Post
#11
|
Advanced Member Group: Members Posts: 162 Joined: 5-December 12 Member No.: 18,203 |
I just found something promising (very close to what I want to do anyway)
http://slbkbs.org/jsgif/ You need to add a book mark for some reason but the javascript gives you total control over gifs and lets you pause and play from the current frame of any gif. Now I just need to modify this script so it just pauses/plays on each click, and remove the buttons from the interface. |
Lo-Fi Version | Time is now: 29th March 2024 - 08:58 AM |