
\documentclass[twocolumn]{article}
\usepackage[pdftex,screen]{web}
\margins{.15in}{.15in}{14pt}{.15in} % left,right,top, bottom
\screensize{5in}{5in} % height, width

% \usepackage{animfig}


\usepackage{multicol}
\usepackage{multido}


\usepackage{pdfanim}
\input pdfanim-patch

\usepackage[pdftex]{eforms}

\pdfcompresslevel 0
\parindent 0 pt

\let\rmdefault\sfdefault


%nepovinny parametr - vzhled tlactika
%povinne parametry: jmeno animace a cislo snimku - prvni snimek je nula
\newcommand\SkipButton[3][]{
\pushButton[\A{\JS{ 
    #2cnt = #3; if (#2running==0)         
    this.getField('#2').buttonSetIcon(this.getField('#2h'+#2cnt).buttonGetIcon());
}}#1
]{#2Skip#3}{12pt}{12pt}}





\def\animace#1#2{%
\PDFAnimLoad[#1]{#2}{trac}{90}
\AtEndDocument{
Options:\\ \texttt{#1}

\PDFAnimation{#2}
\begin{center}
  \PDFProgressField[\textColor{1 0 0 rg}]{#2}{0.5cm}{10pt}

  \PDFAnimButtons[\BG{0 1 0} \BC{}  ]{#2}

  \PDFAnimButtonsP[\BG{0 1 0} \BC{}   ]{#2}

  \PDFAnimDelayButton[\BG{1 1 0.9}\textSize{10}]{#2}{1cm}{12pt}
  \PDFAnimHomeButton[\BG{1 1 0}]{#2}{12pt}{10pt}

  
\end{center}
\eject

}
}


 \multido{\i=1+1}{90}{%\immediate
   \pdfximage page \i{trac.pdf}
   \expandafter\xdef\csname pdf:trac\i\endcsname{\the\pdflastximage}} 


\animace{noshift, bgcolor={1 1 0.9}, defaultframe=30}{a}
\animace{loop}{ab}
\animace{loop, reverse, defaultframe=89}{b}
\animace{step, loop}{c}
\animace{defaultframe=89, reverse}{d}
\animace{loop, remember}{e}




\begin{document}



% \includeanimation{trac.pdf}{100}{85}{0}{1}


%\SkipButton[\BG{0 1 0} \BC{0 0 1}]{a}{40} 
%\SkipButton[\BG{0 1 1} \BC{0 0 1}]{a}{20}
%\SkipButton[\BG{0 1 0} \BC{0 0 1}]{ab}{40} 
%\SkipButton[\BG{0 1 1} \BC{0 0 1}]{ab}{20}


\end{document}
