%
% version 0002
% date 20040622
%
% by Jochen Skupin
%
\documentclass[pdftex,landscape,12pt]{scrartcl}

% rm headers
\renewcommand{\descfont}{\rmfamily}
\renewcommand{\sectfont}{\rmfamily}
\normalfont

\usepackage{hyperref}
\hypersetup{
%    pdfpagetransition=Glitter,
    pdftitle={Lunar eclipse},
    pdfsubject={pdfTeX animation example},
    pdfauthor={Jochen Skupin},
    pdfkeywords={lunar eclipse pdf tex animation},
    pdfpagemode=None,
    plainpages=false,
    pdfstartview=Fit,
    breaklinks=true,
    colorlinks=false,
    pdfhighlight=/N,
    % define colors, even if not used
    linkcolor=blue,
    citecolor=blue,
    urlcolor=blue,
    citebordercolor={1 1 1},
    filebordercolor={1 1 1},
    linkbordercolor={1 1 1},
    menubordercolor={1 1 1},
    pagebordercolor={1 1 1},
    urlbordercolor={1 1 1},
    pdfborder={1 1 1}
  }

% load the pdfanim style, should be done after hyperref
\usepackage{pdfanim}

% load and initialise animation
% arguments:
%   \PDFAnimLoad[options]{name}{xxx}{number}
%   - options: in this example the animation is looped
%   - name: name of the animation
%     (with this name it can be reused several times in the document)
%   - number: number of animation frames / files (n)
% the animation will be composed of files
% xxx0.pdf, xxx1.pdf ... xxx(n-1).pdf
\PDFAnimLoad[width=0.15\linewidth]{eclipse1}{moon_eclipse/moon_eclipse_}{59}%
\PDFAnimLoad[use=eclipse1,width=0.15\linewidth,step]{eclipse2}{moon_eclipse/moon_eclipse_}{59}%
\PDFAnimLoad[use=eclipse1,width=0.15\linewidth,loop]{eclipse3}{moon_eclipse/moon_eclipse_}{59}%
\PDFAnimLoad[use=eclipse1,width=0.15\linewidth,loop,interval=500]{eclipse4}{moon_eclipse/moon_eclipse_}{59}%
\PDFAnimLoad[use=eclipse1,width=0.15\linewidth,auto]{eclipse5}{moon_eclipse/moon_eclipse_}{59}%
\PDFAnimLoad[use=eclipse1,width=0.15\linewidth,auto,loop]{eclipse6}{moon_eclipse/moon_eclipse_}{59}%
\PDFAnimLoad[use=eclipse1,width=0.15\linewidth,auto,loop,noclick]{eclipse7}{moon_eclipse/moon_eclipse_}{59}%
\PDFAnimLoad[use=eclipse1,width=0.15\linewidth,auto,loop,remember]{eclipse8}{moon_eclipse/moon_eclipse_}{59}%
\PDFAnimLoad[use=eclipse1,width=0.15\linewidth,auto,loop,reverse]{eclipse9}{moon_eclipse/moon_eclipse_}{59}%
\PDFAnimLoad[use=eclipse1,width=0.15\linewidth,auto,loop,startframe=30]{eclipse10}{moon_eclipse/moon_eclipse_}{59}%
\PDFAnimLoad[use=eclipse1,usecnt=eclipse8]{eclipse11}{moon_eclipse/moon_eclipse_}{59}%
\PDFAnimLoad[use=eclipse1,width=2cm, height=3cm, depth=1cm]{eclipse12}{moon_eclipse/moon_eclipse_}{59}%

\newcommand{\comment}{%
  % add space for tiny comment line
  \enlargethispage{5\baselineskip}
  % the tiny comment line
  \vspace{2cm}\noindent
  {\tiny
  This file demonstrates how to imbed javascript animations
  in PDF files using pdftex and the PDFAnim style.\hfill
  \begin{tabular}[t]{ll}
  Author: & Jochen Skupin \\
  email: & \url{jochen.skupin@uni-bremen.de}
  \end{tabular}
  }
}

\newcommand{\DemoPage}{%
  \vfill
  \begin{center}
  \begin{tabular}{|c|c|c|c|}
  \hline
  defaults              & step                 & loop                 & loop, interval=500 \\
  \PDFAnimation{eclipse1}&\PDFAnimation{eclipse2}&\PDFAnimation{eclipse3}&\PDFAnimation{eclipse4}\\
  \hline
  auto                  & auto, loop            & auto, loop, noclick   & auto, loop, remember \\
  \PDFAnimation{eclipse5}&\PDFAnimation{eclipse6}&\PDFAnimation{eclipse7}&\PDFAnimation{eclipse8}\\
  \hline
  auto, loop, reverse    & auto, loop, startframe=30& usecnt=eclipse8            &
    \begin{tabular}{c} width=2cm\\ height=3cm\\ depth=1cm \end{tabular}\\
  \PDFAnimation{eclipse9}&\PDFAnimation{eclipse10}&\PDFAnimation{eclipse11}&\PDFAnimation{eclipse12}\\
  \hline
  \end{tabular}
  \end{center}
  \comment
}

\pagestyle{empty}

% --------------------------------------

\begin{document}

  \begin{center}
    {\sffamily
    {\Huge PDF Animation Demo (1/2)} \\[1ex]
    still beta, not all options working, to be loaded via "file open" dialog\par}
  \end{center}
  \DemoPage
  \clearpage
%
  \begin{center}
    {\sffamily
    {\Huge PDF Animation Demo (2/2)} \\[1ex]
    still beta, not all options working, to be loaded via "file open" dialog\par}
  \end{center}
  \DemoPage
  \clearpage
%  
  \begin{center}
    {\sffamily
    {\Huge PDF Animation Demo (3/2)} \\[1ex]
    still beta, not all options working, to be loaded via "file open" dialog\par}
    \vfill Empty page\vfill
  \end{center}
  \comment
\end{document}



