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):