I am trying to make an animation that requires a click before each successive frame is displayed. Further, it will loop back to the first frame upon clicking the last frame.
MWE
In this MWE, the user clicks on each frame to advance. Upon clicking the final frame (the black shirt), the animation loops. However, the red shirt (frame 1) is quickly skipped without the user clicking the frame.
How do I pevent the red shirt frame from being skipped on the second pass?
Note: You may need to download the PDF and use a viewer that supports animation.
\documentclass{standalone}
\usepackage{graphicx}
\usepackage{animate}
\begin{filecontents}{timeline.txt}
::0
::1
*::2
\end{filecontents}
\begin{document}
\centering\animategraphics[timeline=timeline.txt]{5}{frames}{}{}
\end{document}
Example use case
Here's something that's closer to my actual use case.
Steps to replicate:
- Click on red shirt.
- Watch shirt color alternate successively a few times, before settling on black.
- Click on black shirt to return to the beginning.
Expected behavior:
- Frame with red shirt waits for user click
Actual behavior:
- Frame with red shirt quickly advances and shows blue/black shirts
Many thanks for your help!
\documentclass{standalone}
\usepackage{graphicx}
\usepackage{animate}
\begin{filecontents}{timeline.txt}
*::0
::1
::2
::1
::2
::1
::2
\end{filecontents}
\begin{document}
\centering\animategraphics[timeline=timeline.txt]{5}{frames}{}{}
\end{document}
