texlive[41933] Master/texmf-dist: animate (26aug16)

commits+karl at tug.org commits+karl at tug.org
Sat Aug 27 00:06:34 CEST 2016


Revision: 41933
          http://tug.org/svn/texlive?view=revision&revision=41933
Author:   karl
Date:     2016-08-27 00:06:34 +0200 (Sat, 27 Aug 2016)
Log Message:
-----------
animate (26aug16)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/animate/ChangeLog
    trunk/Master/texmf-dist/doc/latex/animate/animate.pdf
    trunk/Master/texmf-dist/source/latex/animate/animate.tex
    trunk/Master/texmf-dist/tex/latex/animate/animate.sty

Modified: trunk/Master/texmf-dist/doc/latex/animate/ChangeLog
===================================================================
--- trunk/Master/texmf-dist/doc/latex/animate/ChangeLog	2016-08-26 22:06:24 UTC (rev 41932)
+++ trunk/Master/texmf-dist/doc/latex/animate/ChangeLog	2016-08-26 22:06:34 UTC (rev 41933)
@@ -1,3 +1,7 @@
+2016-08-26
+	* fix: adjust JavaScript part for compatibility with current PDF-XChange
+	Editor
+
 2016-07-27
 	* new: `method=icon' default setting for dvips+ps2pdf; support for
 	Foxit Reader (besides Acrobat Reader and PDF-XChange Viewer) added

Modified: trunk/Master/texmf-dist/doc/latex/animate/animate.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/animate/animate.tex
===================================================================
--- trunk/Master/texmf-dist/source/latex/animate/animate.tex	2016-08-26 22:06:24 UTC (rev 41932)
+++ trunk/Master/texmf-dist/source/latex/animate/animate.tex	2016-08-26 22:06:34 UTC (rev 41933)
@@ -55,7 +55,7 @@
   \makeatother
 \fi
 
-\def\keywords{include portable PDF animation animated PDF animating embed animated graphics LaTeX pdfLaTeX LuaLaTeX PSTricks pgf TikZ LaTeX-picture MetaPost inline graphics vector graphics animated GIF LaTeX dvips ps2pdf dvipdfmx XeLaTeX JavaScript Acrobat Reader PDF-XChange Viewer Foxit Reader}
+\def\keywords{include portable PDF animation animated PDF animating embed animated graphics LaTeX pdfLaTeX LuaLaTeX PSTricks pgf TikZ LaTeX-picture MetaPost inline graphics vector graphics animated GIF LaTeX dvips ps2pdf dvipdfmx XeLaTeX JavaScript Acrobat Reader PDF-XChange Foxit Reader}
 \hypersetup{
   pdftitle={The animate Package},
   pdfsubject={Documentation},
@@ -121,7 +121,7 @@
 \item pdf\TeX{}, version $\ge1.20$ or Lua\TeX{} for direct PDF output
 \item Ghostscript, version $\ge9.15$ or Adobe Distiller for PS to PDF conversion
 \item dvipdfmx, version $\ge20080607$ for DVI to PDF conversion
-\item Acrobat Reader (version $\ge7$), PDF-XChange Viewer, Foxit Reader
+\item Acrobat Reader (version $\ge7$), PDF-XChange, Foxit Reader
 \end{trivlist}
 
 \section{Installation}

Modified: trunk/Master/texmf-dist/tex/latex/animate/animate.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/animate/animate.sty	2016-08-26 22:06:24 UTC (rev 41932)
+++ trunk/Master/texmf-dist/tex/latex/animate/animate.sty	2016-08-26 22:06:34 UTC (rev 41933)
@@ -13,7 +13,7 @@
 
 \NeedsTeXFormat{LaTeX2e}
 
-\def\@anim at version{2016/07/27}
+\def\@anim at version{2016/08/26}
 \ProvidesPackage{animate}
 [\@anim at version\space PDF animations from files and inline graphics]
 
@@ -1557,9 +1557,11 @@
     \fi%
     \def\@anim at apmk{\@anim at apdummy}%
   \fi%
-  %non-interactive /Screen annotation for initializing the animation
-  %upon PageOpen/PageVisible events and for clean-up upon PageClose/
-  %PageInvisible events
+  %this is for Foxit compatibility:
+  %  Widget annots don't seem to acknowledge /P* events
+  %  a non-interactive /Screen annotation for initializing the animation
+  %  upon PageOpen/PageVisible events and for clean-up upon PageClose/
+  %  PageInvisible events
   \@anim at pdfannot{1ex}{1ex}{\z@}{%
     /Subtype/Screen/F 2%
     /AA <<%
@@ -1590,6 +1592,10 @@
     /T (anm#1)%
     /Contents (animation by animate[\@anim at version])%
     /AA <<%
+      /PV <</S/JavaScript/JS \@anim at pojscriptobj>>% PageVisible
+      /PO <</S/JavaScript/JS \@anim at pojscriptobj>>% PageOpen
+      /PI <</S/JavaScript/JS \@anim at pcjscriptobj>>% PageInvisible
+      /PC <</S/JavaScript/JS \@anim at pcjscriptobj>>% PageClose
       \@anim at otherjscriptkey%
     >>%
     /AP <</N \@anim at apmk>>%
@@ -1792,7 +1798,7 @@
           %build JavaScript commands to fill the `pauseAt' array
           \xdef\@anim at pauseat{%
             \@anim at pauseat%
-            a\the\@anim at num.pauseAt[\the\@anim at curframe@zb]=1;%
+            a\the\@anim at num_pauseAt[\the\@anim at curframe@zb]=1;%
           }%
           \setboolean{@anim at pauseframes}{true}%
         \fi%
@@ -2183,7 +2189,7 @@
       \ifthenelse{\equal{\@anim at tmp}{*}}{%
         \xdef\@anim at pauseat{%
           \@anim at pauseat%
-          a\the\@anim at num.pauseAt[\the\@anim at curframe@zb]=1;%
+          a\the\@anim at num_pauseAt[\the\@anim at curframe@zb]=1;%
         }%
         \setboolean{@anim at pauseframes}{true}%
       }{}%
@@ -2230,7 +2236,7 @@
   \ifx\@anim at tmp\@empty\else%
     \xdef\@anim at usrjsat{%
       \@anim at usrjsat%
-      a\the\@anim at num.usrJSat[\the\@anim at curframe@zb]=function(){#1};%
+      a\the\@anim at num_usrJSat[\the\@anim at curframe@zb]=function(){#1};%
     }%
     \setboolean{@anim at usrjs}{true}%
   \fi%
@@ -2929,18 +2935,17 @@
 \def\@anim@@pojscript#1{% #1: @anim at num
 %  console.show();%
 %  console.clear();%
-  var curdoc=this;%
-  var a#1,a#1_int;%
+  curdoc=this;%
   if(typeof a#1==='undefined'){% initialize animation
-    a#1=new Object();% animation object
+    a#1={};%
     %takes references to frame ocgs/Field objects belonging to the current
     %animation
-    a#1.fr=new Array();%
+    a#1_fr=new Array();%
     %initialize fr properties
     \ifcase\@anim at method %icon based
-      a#1.wid=this.getField('anm#1');%reference to interactive widget
+      a#1_wid=this.getField('anm#1');%reference to interactive widget
       for(i=0;i<=\@anim at maxframe;i++){%
-        a#1.fr[i]=this.getField('#1.'+i).buttonGetIcon();%
+        a#1_fr[i]=this.getField('#1.'+i).buttonGetIcon();%
       }%
       \ifnum\@anim at poster=\@anim at mtwo
         if(typeof blnk==='undefined'){% blank poster
@@ -2950,147 +2955,147 @@
     \or %widget based
       %get array of animation frames
       for(i=0;i<=\@anim at maxframe;i++){%
-        a#1.fr[i]=this.getField('#1.'+i);%
+        a#1_fr[i]=this.getField('#1.'+i);%
       }%
     \or %ocg based
       %get array of ocgs of current page
-      var ocg=this.getOCGs(this.pageNum);%
-      for(var i in ocg){%
-        var ocgName=ocg[i].name.split('.');%
+      ocg=this.getOCGs(this.pageNum);%
+      for(i in ocg){%
+        ocgName=ocg[i].name.split('.');%
         if(ocgName[0]==#1){%
           %get array of animation frames
-          a#1.fr[ocgName[1]]=ocg[i];%
+          a#1_fr[ocgName[1]]=ocg[i];%
           %set basic frame state
-          a#1.fr[ocgName[1]].state=ocg[i].initState;%
+          a#1_fr[ocgName[1]].state=ocg[i].initState;%
         }%
       }%
     \fi%
     \if at anim@controls\if at anim@step\else
-      a#1.btnPauseLeft=this.getField('#1.PauseLeft');%
-      a#1.btnPlayLeft=this.getField('#1.PlayLeft');%
-      a#1.btnPauseRight=this.getField('#1.PauseRight');%
-      a#1.btnPlayRight=this.getField('#1.PlayRight');%
+      a#1_btnPauseLeft=this.getField('#1.PauseLeft');%
+      a#1_btnPlayLeft=this.getField('#1.PlayLeft');%
+      a#1_btnPauseRight=this.getField('#1.PauseRight');%
+      a#1_btnPlayRight=this.getField('#1.PlayRight');%
     \fi\fi%
     %playing state and direction
     \if at anim@step
-      \if at anim@palindrome a#1.playsRight=true;\fi%
+      \if at anim@palindrome a#1_playsRight=true;\fi%
     \else
-      a#1.playsRight=true;%
+      a#1_playsRight=true;%
     \fi%
-    a#1.isPaused=false;%
+    a#1_isPaused=false;%
     \if at anim@step\else
-      a#1.playing=false;%
+      a#1_playing=false;%
       \if at anim@pauseframes
         %this array takes the frame numbers at which to pause playback
-        a#1.pauseAt=new Array();%
+        a#1_pauseAt=new Array();%
         \@anim at pauseat%
       \fi%
       \if at anim@chfps
         %arrays that take frame numbers (array index) and fps values
-        a#1.nFpsAt=new Array(\@anim at nfpsat);%
+        a#1_nFpsAt=new Array(\@anim at nfpsat);%
       \fi
-      a#1.fps=\@anim at fps==0?1e-6:\@anim at fps;a#1.sm=1;%
-      a#1.setFps=function(f){%
-        a#1.fps=f==0?1e-6:f;%
-        if(a#1.playing){%
-          if(a#1.playsRight){a#1.playRight();}else{a#1.playLeft();}%
+      a#1_fps=\@anim at fps==0?1e-6:\@anim at fps;a#1_sm=1;%
+      a#1_setFps=function(f){%
+        a#1_fps=f==0?1e-6:f;%
+        if(a#1_playing){%
+          if(a#1_playsRight){a#1_playRight();}else{a#1_playLeft();}%
         }%
       };%
     \fi%
     \if at anim@usrjs
       %array to take frame numbers (array index) and user provided JavaScript
-      a#1.usrJSat=new Array();%
+      a#1_usrJSat=new Array();%
       \@anim at usrjsat%
     \fi%
     %actions
-    a#1.seekFrame=function(f){%
+    a#1_seekFrame=function(f){%
       \ifnum\@anim at poster=\@anim at mtwo
         if(f<-1){%
           \ifcase\@anim at method %icon based
-            a#1.wid.buttonSetIcon(blnk);%
+            a#1_wid.buttonSetIcon(blnk);%
             curdoc.dirty=false;%
           \or %widget based
-            a#1.on=0;%
-            a#1.fr[0].display=display.hidden;%
+            a#1_on=0;%
+            a#1_fr[0].display=display.hidden;%
             curdoc.dirty=false;%
           \or %ocg based
-            a#1.on=0;%
-            a#1.fr[0].state=false;%
+            a#1_on=0;%
+            a#1_fr[0].state=false;%
           \fi
-          a#1.idx=-1;%
+          a#1_idx=-1;%
         }%
       \fi
       if(f>\@anim at maxframe||f<0){return -1;}%
-      a#1.idx=f;%
+      a#1_idx=f;%
       \if at anim@usrjs
-        if(a#1.usrJSat[f]){%
-          var cmd='try{a#1.usrJSat['+f+']();}catch(e){console.println(e);}';%
+        if(a#1_usrJSat[f]){%
+          var cmd='try{a#1_usrJSat['+f+']();}catch(e){console.println(e);}';%
           var ret=app.setTimeOut(cmd,1);%
         }%
       \fi%
       \ifcase\@anim at method %icon based
-        a#1.wid.buttonSetIcon(a#1.fr[f]);%
+        a#1_wid.buttonSetIcon(a#1_fr[f]);%
         curdoc.dirty=false;%
       \or %widget based
-        a#1.fr[a#1.on].display=display.hidden;%
-        a#1.fr[f].display=display.visible;%
-        a#1.on=f;%
+        a#1_fr[a#1_on].display=display.hidden;%
+        a#1_fr[f].display=display.visible;%
+        a#1_on=f;%
         curdoc.dirty=false;%
       \or %ocg based
-        a#1.fr[a#1.on].state=false;%
-        a#1.fr[f].state=true;%
-        a#1.on=f;%
+        a#1_fr[a#1_on].state=false;%
+        a#1_fr[f].state=true;%
+        a#1_on=f;%
       \fi
       \if at anim@step\else%
         \if at anim@chfps
-          if(a#1.nFpsAt[f]!=a#1.fps){%
-            a#1.setFps(a#1.nFpsAt[f]);%
+          if(a#1_nFpsAt[f]!=a#1_fps){%
+            a#1_setFps(a#1_nFpsAt[f]);%
           }%
         \fi%
       \fi%
-      \if at anim@step\else\if at anim@meas a#1.frcnt++;\fi\fi%
+      \if at anim@step\else\if at anim@meas a#1_frcnt++;\fi\fi%
       return 0;%
     };%
-    a#1.stopFirst=function(){%
+    a#1_stopFirst=function(){%
       \if at anim@step
-        a#1.isPaused=false;% stop
+        a#1_isPaused=false;% stop
       \else
-        a#1.pause(true);% stop
+        a#1_pause(true);% stop
       \fi
-      a#1.seekFrame(0);%
+      a#1_seekFrame(0);%
     };%
-    a#1.stopLast=function(){%
+    a#1_stopLast=function(){%
       \if at anim@step
-        a#1.isPaused=false;% stop
+        a#1_isPaused=false;% stop
       \else
-        a#1.pause(true);% stop
+        a#1_pause(true);% stop
       \fi
-      a#1.seekFrame(\@anim at maxframe);%
+      a#1_seekFrame(\@anim at maxframe);%
     };%
-    a#1.gotoNext=function(){%
-      if(a#1.seekFrame(a#1.idx+1)<0){%
-        \if at anim@step\else\if at anim@meas a#1.stopMeas();\fi\fi%
+    a#1_gotoNext=function(){%
+      if(a#1_seekFrame(a#1_idx+1)<0){%
+        \if at anim@step\else\if at anim@meas a#1_stopMeas();\fi\fi%
         \if at anim@palindrome%
           \if at anim@step
-            a#1.stopLast();%
-            a#1.playsRight=false;%
+            a#1_stopLast();%
+            a#1_playsRight=false;%
           \else
-            if(a#1.playing){%
-              a#1.seekFrame(a#1.idx-1);%
-              a#1.playLeft();%
+            if(a#1_playing){%
+              a#1_seekFrame(a#1_idx-1);%
+              a#1_playLeft();%
             }%
           \fi%
         \else%
           \if at anim@step
-            a#1.stopLast();%
+            a#1_stopLast();%
           \else%
             \if at anim@loop
-              if(a#1.playing){%
-                a#1.seekFrame(0);%
-                a#1.setFps(\@anim at fps);%
-              }else{a#1.stopLast();}%
+              if(a#1_playing){%
+                a#1_seekFrame(0);%
+                a#1_setFps(\@anim at fps);%
+              }else{a#1_stopLast();}%
             \else
-              a#1.stopLast();%
+              a#1_stopLast();%
             \fi%
           \fi%
         \fi
@@ -3098,33 +3103,33 @@
       }%
       \if at anim@step\else%
         \if at anim@pauseframes
-          if(a#1.playing&&a#1.pauseAt[a#1.idx]){a#1.pause();}%
+          if(a#1_playing&&a#1_pauseAt[a#1_idx]){a#1_pause();}%
         \fi%
       \fi%
     };%
-    a#1.gotoPrev=function(){%
-      if(a#1.seekFrame(a#1.idx-1)<0){%
-        \if at anim@step\else\if at anim@meas a#1.stopMeas();\fi\fi%
+    a#1_gotoPrev=function(){%
+      if(a#1_seekFrame(a#1_idx-1)<0){%
+        \if at anim@step\else\if at anim@meas a#1_stopMeas();\fi\fi%
         \if at anim@palindrome%
           \if at anim@step
-            a#1.stopFirst();%
-            a#1.playsRight=true;%
+            a#1_stopFirst();%
+            a#1_playsRight=true;%
           \else
-            if(a#1.playing){%
-              a#1.seekFrame(a#1.idx+1);%
-              a#1.playRight();%
+            if(a#1_playing){%
+              a#1_seekFrame(a#1_idx+1);%
+              a#1_playRight();%
             }%
           \fi%
         \else%
           \if at anim@step
-            a#1.stopFirst();%
+            a#1_stopFirst();%
           \else%
             \if at anim@loop
-              if(a#1.playing){%
-                a#1.seekFrame(\@anim at maxframe);%
-              }else{a#1.stopFirst();}%
+              if(a#1_playing){%
+                a#1_seekFrame(\@anim at maxframe);%
+              }else{a#1_stopFirst();}%
             \else
-              a#1.stopFirst();%
+              a#1_stopFirst();%
             \fi%
           \fi%
         \fi
@@ -3132,114 +3137,114 @@
       }%
       \if at anim@step\else%
         \if at anim@pauseframes
-          if(a#1.playing&&a#1.pauseAt[a#1.idx]){a#1.pause();}%
+          if(a#1_playing&&a#1_pauseAt[a#1_idx]){a#1_pause();}%
         \fi%
       \fi%
     };%
     \if at anim@step\else
-      a#1.pause=function(stop){%
+      a#1_pause=function(stop){%
         try{app.clearInterval(a#1_int);}catch(e){}%
-        a#1.playing=false;%
-        a#1.isPaused=!stop;%
+        a#1_playing=false;%
+        a#1_isPaused=!stop;%
         \if at anim@controls
-          a#1.btnPauseLeft.display=display.hidden;%
-          a#1.btnPlayLeft.display=display.visible;%
-          a#1.btnPauseRight.display=display.hidden;%
-          a#1.btnPlayRight.display=display.visible;%
+          a#1_btnPauseLeft.display=display.hidden;%
+          a#1_btnPlayLeft.display=display.visible;%
+          a#1_btnPauseRight.display=display.hidden;%
+          a#1_btnPlayRight.display=display.visible;%
           curdoc.dirty=false;%
         \fi%
       };%
-      a#1.playRight=function(){%
-        \if at anim@meas a#1.startMeas();\fi
-        try{var tmp_int=app.setInterval('a#1.gotoNext()',%
-          1000/a#1.fps/a#1.sm);}catch(e){}%
+      a#1_playRight=function(){%
+        \if at anim@meas a#1_startMeas();\fi
+        try{var tmp_int=app.setInterval('a#1_gotoNext()',%
+          1000/a#1_fps/a#1_sm);}catch(e){}%
         try{app.clearInterval(a#1_int);}catch(e){}%
         a#1_int=tmp_int;%
-        a#1.playsRight=true;%
-        a#1.playing=true;%
-        a#1.isPaused=false;%
+        a#1_playsRight=true;%
+        a#1_playing=true;%
+        a#1_isPaused=false;%
         \if at anim@controls
-          a#1.btnPauseLeft.display=display.visible;%
-          a#1.btnPlayLeft.display=display.hidden;%
-          a#1.btnPauseRight.display=display.visible;%
-          a#1.btnPlayRight.display=display.hidden;%
+          a#1_btnPauseLeft.display=display.visible;%
+          a#1_btnPlayLeft.display=display.hidden;%
+          a#1_btnPauseRight.display=display.visible;%
+          a#1_btnPlayRight.display=display.hidden;%
           curdoc.dirty=false;%
         \fi%
       };%
-      a#1.playLeft=function(){%
-        \if at anim@meas a#1.startMeas();\fi
-        try{var tmp_int=app.setInterval('a#1.gotoPrev()',%
-          1000/a#1.fps/a#1.sm);}catch(e){}%
+      a#1_playLeft=function(){%
+        \if at anim@meas a#1_startMeas();\fi
+        try{var tmp_int=app.setInterval('a#1_gotoPrev()',%
+          1000/a#1_fps/a#1_sm);}catch(e){}%
         try{app.clearInterval(a#1_int);}catch(e){}%
         a#1_int=tmp_int;%
-        a#1.playsRight=false;%
-        a#1.playing=true;%
-        a#1.isPaused=false;%
+        a#1_playsRight=false;%
+        a#1_playing=true;%
+        a#1_isPaused=false;%
         \if at anim@controls
-          a#1.btnPauseLeft.display=display.visible;%
-          a#1.btnPlayLeft.display=display.hidden;%
-          a#1.btnPauseRight.display=display.visible;%
-          a#1.btnPlayRight.display=display.hidden;%
+          a#1_btnPauseLeft.display=display.visible;%
+          a#1_btnPlayLeft.display=display.hidden;%
+          a#1_btnPauseRight.display=display.visible;%
+          a#1_btnPlayRight.display=display.hidden;%
           curdoc.dirty=false;%
         \fi%
       };%
       \if at anim@controls
-        a#1.fpsIncr=function(){% speed up animation
-          a#1.sm*=1.1;%
-          a#1.setFps(a#1.fps);%
+        a#1_fpsIncr=function(){% speed up animation
+          a#1_sm*=1.1;%
+          a#1_setFps(a#1_fps);%
         };%
-        a#1.fpsDecr=function(){% slow down animation
-          a#1.sm/=1.1;%
-          a#1.setFps(a#1.fps);%
+        a#1_fpsDecr=function(){% slow down animation
+          a#1_sm/=1.1;%
+          a#1_setFps(a#1_fps);%
         };%
-        a#1.fpsReset=function(){% reset to default speed
-          a#1.sm=1;%
-          a#1.setFps(a#1.fps);%
+        a#1_fpsReset=function(){% reset to default speed
+          a#1_sm=1;%
+          a#1_setFps(a#1_fps);%
         };%
       \fi%
       \if at anim@meas
-        var spc=String.fromCharCode(32);%
-        a#1.frcnt=1;% frame counter for speed measurements
-        a#1.msStart=0;% takes start time (in millisecs)
-        a#1.msEnd=0;% takes end time (in millisecs)
-        a#1.startMeas=function(){%
-          a#1.frcnt=1;% reset frame counter
-          a#1.msStart=(new Date()).getTime();%
+        spc=String.fromCharCode(32);%
+        a#1_frcnt=1;% frame counter for speed measurements
+        a#1_msStart=0;% takes start time (in millisecs)
+        a#1_msEnd=0;% takes end time (in millisecs)
+        a#1_startMeas=function(){%
+          a#1_frcnt=1;% reset frame counter
+          a#1_msStart=(new Date()).getTime();%
         };%
-        a#1.stopMeas=function(){%
-          a#1.msEnd=(new Date()).getTime();%
+        a#1_stopMeas=function(){%
+          a#1_msEnd=(new Date()).getTime();%
           console.show();console.println(%
             'av.'+spc+'frame'+spc+'rate:'+spc+%
-            1e3*a#1.frcnt/(a#1.msEnd-a#1.msStart)+spc+'fps'%
+            1e3*a#1_frcnt/(a#1_msEnd-a#1_msStart)+spc+'fps'%
           );%
         };%
       \fi%
     \fi%
     \if at anim@step
-      a#1.stepBwd=function(){%
-        a#1.seekFrame(a#1.idx-1);%
-        a#1.isPaused=true;%
+      a#1_stepBwd=function(){%
+        a#1_seekFrame(a#1_idx-1);%
+        a#1_isPaused=true;%
       };%
-      a#1.stepFwd=function(){%
-        a#1.seekFrame(a#1.idx+1);%
-        a#1.isPaused=true;%
+      a#1_stepFwd=function(){%
+        a#1_seekFrame(a#1_idx+1);%
+        a#1_isPaused=true;%
       };%
     \else
-      a#1.stepBwd=function(){if(!a#1.playing){%
-        a#1.seekFrame(a#1.idx-1);%
-        a#1.isPaused=true;%
+      a#1_stepBwd=function(){if(!a#1_playing){%
+        a#1_seekFrame(a#1_idx-1);%
+        a#1_isPaused=true;%
       }};%
-      a#1.stepFwd=function(){if(!a#1.playing){%
-        a#1.seekFrame(a#1.idx+1);%
-        a#1.isPaused=true;%
+      a#1_stepFwd=function(){if(!a#1_playing){%
+        a#1_seekFrame(a#1_idx+1);%
+        a#1_isPaused=true;%
       }};%
-      a#1.playBwd=function(){%
-        if(a#1.idx==0||!a#1.isPaused){a#1.stopLast();}%
-        a#1.playLeft();%
+      a#1_playBwd=function(){%
+        if(a#1_idx==0||!a#1_isPaused){a#1_stopLast();}%
+        a#1_playLeft();%
       };%
-      a#1.playFwd=function(){%
-        if(a#1.idx==\@anim at maxframe||!a#1.isPaused){a#1.stopFirst();}%
-        a#1.playRight();%
+      a#1_playFwd=function(){%
+        if(a#1_idx==\@anim at maxframe||!a#1_isPaused){a#1_stopFirst();}%
+        a#1_playRight();%
       };%
     \fi%
     %animation API for labelled anims
@@ -3248,21 +3253,21 @@
       if(typeof anim['\@anim at label']==='undefined'){%
         anim['\@anim at label']={%
           \if at anim@step\else
-            playBwd:a#1.playBwd,%
-            playFwd:a#1.playFwd,%
-            pause:a#1.pause,%
-            get isPlaying(){return a#1.playing;},%
-            get fps(){return a#1.fps;},%
+            playBwd:a#1_playBwd,%
+            playFwd:a#1_playFwd,%
+            pause:a#1_pause,%
+            get isPlaying(){return a#1_playing;},%
+            get fps(){return a#1_fps;},%
             set fps(f){%
               if(f<0||isNaN(f)){%
                 throw new RangeError('Frame_rate_not_in_allowed_range');%
-              }else{a#1.setFps(f);}%
+              }else{a#1_setFps(f);}%
             },%
-            get dt(){return 1000/a#1.fps/a#1.sm;},%
-            get playsFwd(){return a#1.playsRight;},%
+            get dt(){return 1000/a#1_fps/a#1_sm;},%
+            get playsFwd(){return a#1_playsRight;},%
           \fi
           get numFrames(){return \@anim at frames;},%
-          get frameNum(){return a#1.idx;},%
+          get frameNum(){return a#1_idx;},%
           set frameNum(f){%
             f=Math.floor(f);%
             if(f<0||f>\@anim at maxframe||isNaN(f)){%
@@ -3269,36 +3274,36 @@
               throw new RangeError('Frame_number_not_in_allowed_range');%
             }%
             \if at anim@step
-              if(a#1.seekFrame(f)>-1)a#1.isPaused=true;%
+              if(a#1_seekFrame(f)>-1)a#1_isPaused=true;%
             \else
-              if(a#1.playing){%
-                a#1.pause();a#1.seekFrame(f);%
-                if(a#1.playsRight){a#1.playRight();}else{a#1.playLeft();}%
-              }else{if(a#1.seekFrame(f)>-1)a#1.isPaused=true;}%
+              if(a#1_playing){%
+                a#1_pause();a#1_seekFrame(f);%
+                if(a#1_playsRight){a#1_playRight();}else{a#1_playLeft();}%
+              }else{if(a#1_seekFrame(f)>-1)a#1_isPaused=true;}%
             \fi%
           },%
-          stopFirst:a#1.stopFirst,%
-          stopLast:a#1.stopLast%
+          stopFirst:a#1_stopFirst,%
+          stopLast:a#1_stopLast%
         };%
       }%
     \fi%
-    \ifnum\@anim at method>\z@ a#1.on=0;\fi% just initialize a#1.on
+    \ifnum\@anim at method>\z@ a#1_on=0;\fi% just initialize a#1_on
     \ifnum\@anim at poster=\@anim at mtwo %poster=none
-      var ret=app.setTimeOut('a#1.seekFrame(-2)',1);%
+      ret=app.setTimeOut('a#1_seekFrame(-2)',1);%
     \fi%
     \ifnum\@anim at poster>\@anim at mone %poster=<num>|first
-      var ret=app.setTimeOut('a#1.seekFrame(\@anim at poster)',1);%
+      ret=app.setTimeOut('a#1_seekFrame(\@anim at poster)',1);%
     \fi%
     \ifnum\@anim at poster=\@anim at mone %poster=last
-      var ret=app.setTimeOut('a#1.seekFrame(\@anim at maxframe)',1);%
+      ret=app.setTimeOut('a#1_seekFrame(\@anim at maxframe)',1);%
     \fi%
   }%
   \if at anim@step\else%
     \if at anim@autoplayorresume%
       \if at anim@autoresume
-        if(a#1.isPaused){%
+        if(a#1_isPaused){%
       \fi
-        if(a#1.playsRight){a#1.playRight();}else{a#1.playLeft();}%
+        if(a#1_playsRight){a#1_playRight();}else{a#1_playLeft();}%
       \if at anim@autoresume%
         }%
       \fi%
@@ -3313,27 +3318,27 @@
 }
 \def\@anim@@pcjscript#1{% #1: @anim at num
   \if at anim@step%
-    \if at anim@palindrome a#1.playsRight=true;\fi%
+    \if at anim@palindrome a#1_playsRight=true;\fi%
   \else
-    if(a#1.playing){
+    if(a#1_playing){
       \if at anim@autopause
-        a#1.pause();%
+        a#1_pause();%
       \else
-        a#1.pause(true);% stop
+        a#1_pause(true);% stop
       \fi%
     }
-    if(!a#1.isPaused)a#1.playsRight=true;%
+    if(!a#1_isPaused)a#1_playsRight=true;%
   \fi
   %re-display poster frame
-  if(!a#1.isPaused){% i.e. if stopped
+  if(!a#1_isPaused){% i.e. if stopped
     \ifnum\@anim at poster=\@anim at mtwo %poster=none
-      var ret=app.setTimeOut('a#1.seekFrame(-2)',1);%
+      ret=app.setTimeOut('a#1_seekFrame(-2)',1);%
     \fi%
     \ifnum\@anim at poster>\@anim at mone %poster=<num>|first
-      var ret=app.setTimeOut('a#1.seekFrame(\@anim at poster)',1);%
+      ret=app.setTimeOut('a#1_seekFrame(\@anim at poster)',1);%
     \fi%
     \ifnum\@anim at poster=\@anim at mone %poster=last
-      var ret=app.setTimeOut('a#1.seekFrame(\@anim at maxframe)',1);%
+      ret=app.setTimeOut('a#1_seekFrame(\@anim at maxframe)',1);%
     \fi%
   }%
 }
@@ -3344,7 +3349,7 @@
     /D <</S/JavaScript/JS (%
       app.focusRect=false;% disable focus rectangle
       \if at anim@step\else % pause on MouseDown
-        try{if(a#1.playing){a#1.pause();}}catch(e){}%
+        try{if(a#1_playing){a#1_pause();}}catch(e){}%
       \fi%
     )>>%
     /U <</S/JavaScript/JS (% play/resume on MouseUp
@@ -3351,47 +3356,47 @@
       try{%
         \if at anim@step%
           \if at anim@palindrome
-            if(event.shift)a#1.playsRight=!a#1.playsRight;%
-            if(a#1.idx==\@anim at maxframe){%
-              a#1.playsRight=false;%
-            }else if(a#1.idx==0){%
-              a#1.playsRight=true;%
+            if(event.shift)a#1_playsRight=!a#1_playsRight;%
+            if(a#1_idx==\@anim at maxframe){%
+              a#1_playsRight=false;%
+            }else if(a#1_idx==0){%
+              a#1_playsRight=true;%
             }%
-            if(a#1.playsRight){%
-              a#1.gotoNext();%
+            if(a#1_playsRight){%
+              a#1_gotoNext();%
             }else{%
-              a#1.gotoPrev();%
+              a#1_gotoPrev();%
             }%
           \else
             if(event.shift){%
-              if(a#1.idx==0){%
-                a#1.stopLast();%
+              if(a#1_idx==0){%
+                a#1_stopLast();%
               }else{%
-                a#1.gotoPrev();%
+                a#1_gotoPrev();%
               }%
             }else{%  
-              if(a#1.idx==\@anim at maxframe){%
-                a#1.stopFirst();%
+              if(a#1_idx==\@anim at maxframe){%
+                a#1_stopFirst();%
               }else{%
-                a#1.gotoNext();%
+                a#1_gotoNext();%
               }%
             }%  
           \fi
-          a#1.isPaused=true;%
+          a#1_isPaused=true;%
         \else
-          if(!a#1.isPaused)a#1.stopFirst();%
-          if(event.shift)a#1.playsRight=!a#1.playsRight;%
+          if(!a#1_isPaused)a#1_stopFirst();%
+          if(event.shift)a#1_playsRight=!a#1_playsRight;%
           \if at anim@palindrome
-            if(a#1.idx==0)a#1.playsRight=true;%
-            if(a#1.idx==\@anim at maxframe)a#1.playsRight=false;%
+            if(a#1_idx==0)a#1_playsRight=true;%
+            if(a#1_idx==\@anim at maxframe)a#1_playsRight=false;%
           \else
-            if(a#1.idx==\@anim at maxframe&&a#1.playsRight)a#1.stopFirst();%
-            if(a#1.idx==0&&!a#1.playsRight)a#1.stopLast();%
+            if(a#1_idx==\@anim at maxframe&&a#1_playsRight)a#1_stopFirst();%
+            if(a#1_idx==0&&!a#1_playsRight)a#1_stopLast();%
           \fi
-          if(a#1.playsRight){%
-            a#1.playRight();%
+          if(a#1_playsRight){%
+            a#1_playRight();%
           }else{%
-            a#1.playLeft();%
+            a#1_playLeft();%
           }%
         \fi%
       }catch(e){}%
@@ -3414,31 +3419,31 @@
   \xdef\@anim at upjscriptstring{%
     app.focusRect=false;%
     \ifx\@anim at action\@anim at EndLeft
-      a#1.stopFirst();%
+      a#1_stopFirst();%
     \else%
     \ifx\@anim at action\@anim at StepLeft
-      a#1.stepBwd();%
+      a#1_stepBwd();%
     \else%
     \ifx\@anim at action\@anim at PlayPauseLeft
-      if(a#1.playing){a#1.pause();}else{a#1.playBwd();}%
+      if(a#1_playing){a#1_pause();}else{a#1_playBwd();}%
     \else%
     \ifx\@anim at action\@anim at PlayPauseRight
-      if(a#1.playing){a#1.pause();}else{a#1.playFwd();}%
+      if(a#1_playing){a#1_pause();}else{a#1_playFwd();}%
     \else%
     \ifx\@anim at action\@anim at StepRight
-      a#1.stepFwd();%
+      a#1_stepFwd();%
     \else%
     \ifx\@anim at action\@anim at EndRight
-      a#1.stopLast();%
+      a#1_stopLast();%
     \else%
     \ifx\@anim at action\@anim at Minus
-      a#1.fpsDecr();%
+      a#1_fpsDecr();%
     \else%
     \ifx\@anim at action\@anim at Reset
-      a#1.fpsReset();%
+      a#1_fpsReset();%
     \else%
     \ifx\@anim at action\@anim at Plus
-      a#1.fpsIncr();%
+      a#1_fpsIncr();%
     \fi\fi\fi\fi\fi\fi\fi\fi\fi%
   }%
 }



More information about the tex-live-commits mailing list