The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Pausing a GIF animation on mouse-click or hover
dsmith916
post 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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post 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...
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
dsmith916
post Dec 13 2013, 02:57 PM
Post #3


Advanced Member
****

Group: Members
Posts: 162
Joined: 5-December 12
Member No.: 18,203



QUOTE(Christian J @ Dec 13 2013, 02:54 PM) *

My browser doesn't allow GIF animations in the first place...


What browser? Did you do that yourself?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post 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. tongue.gif

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.

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Dec 13 2013, 04:24 PM
Post #5


.
********

Group: WDG Moderators
Posts: 9,630
Joined: 10-August 06
Member No.: 7



QUOTE(dsmith916 @ Dec 13 2013, 08:38 PM) *

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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
dsmith916
post Dec 13 2013, 05:31 PM
Post #6


Advanced Member
****

Group: Members
Posts: 162
Joined: 5-December 12
Member No.: 18,203



QUOTE(dsmith916 @ Dec 13 2013, 08:38 PM) *

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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post 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/ .
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
dsmith916
post Dec 15 2013, 06:09 PM
Post #8


Advanced Member
****

Group: Members
Posts: 162
Joined: 5-December 12
Member No.: 18,203



QUOTE(pandy @ Dec 13 2013, 05:34 PM) *

They have. Top of Google: http://freezeframe.chrisantonellis.com/ .


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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post 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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
dsmith916
post Dec 16 2013, 05:27 AM
Post #10


Advanced Member
****

Group: Members
Posts: 162
Joined: 5-December 12
Member No.: 18,203



QUOTE(pandy @ Dec 15 2013, 09:34 PM) *

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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
dsmith916
post 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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 29th March 2024 - 05:44 AM