Gif start and stop

Need a gif to begin once tapped, play for x amount of time, then stop.

I’ve tried using the image button so that the pressed image is the gif, but you have to hold it down for it to play.

I’ve also tried using a still that switches to the gif on tap but there is a delay between the switch.

What is the best way to do this so that it is a seamless switch between the still and gif?

Hi @madison,

What you need to do is make a transparent button. Behind that button place an image that is the same as your first gif frame. When the button is pressed, hide the image and show the gif. Once the animation is done (X amount of time), hide the gif and show again the image.
We used this technique in the sample called “Slot Machine” (for the lever):

Otherwise, you could make a short video and have a transparent button on top of it that plays the video when pressed. You could even make a transparent video if you need it to be a certain shape (http://support.intuilab.com/kb/assets/video-asset#about-videos-with-a-transparent-background)

1 Like