Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial

April Evelyn-Cooper
171 PointsGIF form
Hi Guys,
I want to turn my gif into a form for a newsletter, the animation is an envelope which pops open with a piece of paper, it then closes and a sent stamp appears on it. I want to get the gif to stop at the point the paper pops up and allow visitors to the site to put in their details press send then get the gif to reanimate with the paper going back into the envelope. Can anyone suggest a way I could do this or if it's possible?
3 Answers

April Evelyn-Cooper
171 PointsThanks so much Luke! You are amazing. Unfortunately I already paid an animator to do gif so I can't do the animation in SVG. But thank again for your help.

April Evelyn-Cooper
171 PointsHI Luke,
Thanks for helping me, it's for a website.

Luke Pettway
16,592 PointsPhew, I was worried for a second you were going to say it was for an email which would have been a difficult situation. Yes there are several javascript frameworks that exist which can pause gifs such as:
https://github.com/ctrl-freaks/freezeframe.js/
https://github.com/krasimir/gifffer
The biggest challenge you'll face is timing the gif perfect, and it might be too much trouble to go that route. Have you considered using an SVG or a sprited image to achieve the same effect? Here are some examples from a codepen search http://codepen.io/search?q=Envelope&limit=all&depth=everything&show_forks=false :
Luke Pettway
16,592 PointsLuke Pettway
16,592 PointsIs this for an email or a page on a website?