http://www.texample.net/tikz/examples/s ... animation/
as a model. It is working fine, except that when I try to use opacity commands in TikZ within the animateinline environment, the entire TikZ picture shows up as blank in the animation. I am using MikTeX and compiling with pdftex directly to pdf, which I am then viewing with Adobe Reader 9. Does anyone have any suggestions as to what is wrong and how I might fix or work around it?
Here is a minimal working example of the problem. Thank you for any help you can give.
Code: Select all
\documentclass{minimal}
\usepackage{tikz}
\usepackage{animate}
\begin{document}
Opacity:\\
\begin{tikzpicture}
\draw (-2,-2) rectangle (4,2);
\fill[cyan] (0,0) circle (2);
\fill[magenta, opacity=0.5] (2,0) circle (2);
\end{tikzpicture}%
Animation:\\
\newcounter{time}
\begin{animateinline}[controls]{30}%
%
\setcounter{time}{0}%
\whiledo{\thetime<101}{%
%
\begin{tikzpicture}
\draw (-2,-2) rectangle (4,2);
\fill[cyan] (0,0) circle (2);
\fill[magenta] (2,0) circle ({2*\arabic{time}/100});
\end{tikzpicture}%
%
\stepcounter{time}%
\ifthenelse{\thetime<101}{%
\newframe%
}{%
\end{animateinline}%
}%
}%
Opacity with Animation:\\
\begin{animateinline}[controls]{30}%
%
\setcounter{time}{0}%
\whiledo{\thetime<101}{%
%
\begin{tikzpicture}
\draw (-2,-2) rectangle (4,2);
\fill[cyan] (0,0) circle (2);
\fill[magenta,opacity=0.5] (2,0) circle ({2*\arabic{time}/100});
\end{tikzpicture}%
%
\stepcounter{time}%
\ifthenelse{\thetime<101}{%
\newframe%
}{%
\end{animateinline}%
}%
}%
Opacity with Animation, even simpler:\\
\begin{animateinline}[controls]{30}%
\begin{tikzpicture}
\draw (-2,-2) rectangle (4,2);
\fill[cyan] (0,0) circle (2);
\fill[magenta,opacity=0.5] (2,0) circle ({2*\arabic{time}/100});
\end{tikzpicture}%
\end{animateinline}%
\end{document}