I am new to Beamer/Tikz animation, I have been searching intensively and I have not found any answers to my specific case.
Description:
I have a graph of a process similar to a flowchart with several paths that can be obtained. I would like to draw a ball or a dot that moves along the different options, to describe the possible path that can be taken. The most similar thread that I have found is ttps://tex.stackexchange.com/questions/475463/animate-an-airplane-in-beamer but in my case, the graph is fixed I only want to move an element through the graph.
I am attaching a sample flow chart but mine is less complicated. I will appreciate your help!
The following code is what I have at the moment. Instead of a line, I would like to draw a dot that moves around through different paths.
\documentclass{beamer}
\usepackage{tikz}
\pgfdeclarelayer{background}
\pgfdeclarelayer{foreground}
\pgfsetlayers{background,main,foreground}
\begin{document}
\begin{frame}
\begin{figure}
\begin{center}
\begin{tikzpicture}
\node[anchor=south west,inner sep=0] (image) at (0,0)
{\includegraphics[width=0.9\textwidth]{figures/Flow_3.png}};
\begin{scope}[x={(image.south east)},y={(image.north west)}]
%draw path
\begin{pgfonlayer}{foreground}
\path<2->[draw,line width=2pt,-,red] (0.16,0.24) edge node {} (0.59,0.24);
\end{pgfonlayer}
\end{scope}
\end{tikzpicture}
\end{center}
\label{fig:1}
\end{figure}
\end{frame}
\end{document}
EDIT***
Thanks to the @AlexG contribution I was able to write the following code. The problem now is that I need to include different paths "resetting" the frame each time. How can I do it?
\documentclass{beamer}
\usepackage{tikz}
\userpackage{animate}
\tikzset{dot/.pic={\fill[red] (0,0) circle [radius=2pt];}}
\begin{document}
\begin{frame}
\begin{figure}
\begin{center}
%Animation
\begin{animateinline}[controls={play,stop}]{12}%
\multiframe{11}{rPos=0+0.1}{%
\begin{tikzpicture}
\node [anchor=south west,inner sep=0] (image) at (0,0) {\includegraphics[width=0.9\textwidth]{figures/Flow_3.png}};
\path (1.67,1.24) -| (2.3,1.24) pic [pos=\rPos] {dot};
%To draw the grid for coordinates
\begin{scope}[x={(image.south east)},y={(image.north west)}]
%GRID
\draw[help lines,xstep=.1,ystep=.1] (0,0) grid (1,1);
\foreach \x in {0,1,...,9} { \node [anchor=north] at (\x/10,0) {0.\x}; }
\foreach \y in {0,1,...,9} { \node [anchor=east] at (0,\y/10) {0.\y}; }
\end{scope}
\end{tikzpicture}%
}%
\newframe* % pause here, click to continue
\multiframe{11}{rPos=0+0.1}{%
\begin{tikzpicture}
\node [anchor=south west,inner sep=0] (image) at (0,0){\includegraphics[width=0.9\textwidth]{figures/Flow_3.png}};
\path (2.3, 1.24) |- (6.59,1.24) pic [pos=\rPos] {dot};
\begin{scope}[x={(image.south east)},y={(image.north west)}] \end{scope}
\end{tikzpicture}%
}%
\end{animateinline}
\end{center}
\end{figure}
I will appreciate your help!


\foreachloop. Could you post a working example so that we can see where you start from ? – BambOo Oct 30 '20 at 18:06use bounding box relative coordinatesstyle proposed by Max here https://tex.stackexchange.com/a/445311/141947 – BambOo Nov 02 '20 at 12:10