diff options
author | Karl Berry <karl@freefriends.org> | 2016-08-26 22:06:34 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-08-26 22:06:34 +0000 |
commit | 30f80963660c534a32ea3ffc97e399a613185df1 (patch) | |
tree | 9bb86d00698882287f8dcb0bed6ed98c68a8d943 /Master/texmf-dist/tex | |
parent | a959dbc65f193b65d954cd81934703d76140154d (diff) |
animate (26aug16)
git-svn-id: svn://tug.org/texlive/trunk@41933 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/animate/animate.sty | 451 |
1 files changed, 228 insertions, 223 deletions
diff --git a/Master/texmf-dist/tex/latex/animate/animate.sty b/Master/texmf-dist/tex/latex/animate/animate.sty index 0e460e7fad0..71e838b97de 100644 --- a/Master/texmf-dist/tex/latex/animate/animate.sty +++ b/Master/texmf-dist/tex/latex/animate/animate.sty @@ -13,7 +13,7 @@ \NeedsTeXFormat{LaTeX2e} -\def\@anim@version{2016/07/27} +\def\@anim@version{2016/08/26} \ProvidesPackage{animate} [\@anim@version\space PDF animations from files and inline graphics] @@ -1557,9 +1557,11 @@ \fi% \def\@anim@apmk{\@anim@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@pdfannot{1ex}{1ex}{\z@}{% /Subtype/Screen/F 2% /AA <<% @@ -1590,6 +1592,10 @@ /T (anm#1)% /Contents (animation by animate[\@anim@version])% /AA <<% + /PV <</S/JavaScript/JS \@anim@pojscriptobj>>% PageVisible + /PO <</S/JavaScript/JS \@anim@pojscriptobj>>% PageOpen + /PI <</S/JavaScript/JS \@anim@pcjscriptobj>>% PageInvisible + /PC <</S/JavaScript/JS \@anim@pcjscriptobj>>% PageClose \@anim@otherjscriptkey% >>% /AP <</N \@anim@apmk>>% @@ -1792,7 +1798,7 @@ %build JavaScript commands to fill the `pauseAt' array \xdef\@anim@pauseat{% \@anim@pauseat% - a\the\@anim@num.pauseAt[\the\@anim@curframe@zb]=1;% + a\the\@anim@num_pauseAt[\the\@anim@curframe@zb]=1;% }% \setboolean{@anim@pauseframes}{true}% \fi% @@ -2183,7 +2189,7 @@ \ifthenelse{\equal{\@anim@tmp}{*}}{% \xdef\@anim@pauseat{% \@anim@pauseat% - a\the\@anim@num.pauseAt[\the\@anim@curframe@zb]=1;% + a\the\@anim@num_pauseAt[\the\@anim@curframe@zb]=1;% }% \setboolean{@anim@pauseframes}{true}% }{}% @@ -2230,7 +2236,7 @@ \ifx\@anim@tmp\@empty\else% \xdef\@anim@usrjsat{% \@anim@usrjsat% - a\the\@anim@num.usrJSat[\the\@anim@curframe@zb]=function(){#1};% + a\the\@anim@num_usrJSat[\the\@anim@curframe@zb]=function(){#1};% }% \setboolean{@anim@usrjs}{true}% \fi% @@ -2929,18 +2935,17 @@ \def\@anim@@pojscript#1{% #1: @anim@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@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@maxframe;i++){% - a#1.fr[i]=this.getField('#1.'+i).buttonGetIcon();% + a#1_fr[i]=this.getField('#1.'+i).buttonGetIcon();% }% \ifnum\@anim@poster=\@anim@mtwo if(typeof blnk==='undefined'){% blank poster @@ -2950,147 +2955,147 @@ \or %widget based %get array of animation frames for(i=0;i<=\@anim@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@anim@controls\if@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@anim@step - \if@anim@palindrome a#1.playsRight=true;\fi% + \if@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@anim@step\else - a#1.playing=false;% + a#1_playing=false;% \if@anim@pauseframes %this array takes the frame numbers at which to pause playback - a#1.pauseAt=new Array();% + a#1_pauseAt=new Array();% \@anim@pauseat% \fi% \if@anim@chfps %arrays that take frame numbers (array index) and fps values - a#1.nFpsAt=new Array(\@anim@nfpsat);% + a#1_nFpsAt=new Array(\@anim@nfpsat);% \fi - a#1.fps=\@anim@fps==0?1e-6:\@anim@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@fps==0?1e-6:\@anim@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@anim@usrjs %array to take frame numbers (array index) and user provided JavaScript - a#1.usrJSat=new Array();% + a#1_usrJSat=new Array();% \@anim@usrjsat% \fi% %actions - a#1.seekFrame=function(f){% + a#1_seekFrame=function(f){% \ifnum\@anim@poster=\@anim@mtwo if(f<-1){% \ifcase\@anim@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@maxframe||f<0){return -1;}% - a#1.idx=f;% + a#1_idx=f;% \if@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@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@anim@step\else% \if@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@anim@step\else\if@anim@meas a#1.frcnt++;\fi\fi% + \if@anim@step\else\if@anim@meas a#1_frcnt++;\fi\fi% return 0;% };% - a#1.stopFirst=function(){% + a#1_stopFirst=function(){% \if@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@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@maxframe);% + a#1_seekFrame(\@anim@maxframe);% };% - a#1.gotoNext=function(){% - if(a#1.seekFrame(a#1.idx+1)<0){% - \if@anim@step\else\if@anim@meas a#1.stopMeas();\fi\fi% + a#1_gotoNext=function(){% + if(a#1_seekFrame(a#1_idx+1)<0){% + \if@anim@step\else\if@anim@meas a#1_stopMeas();\fi\fi% \if@anim@palindrome% \if@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@anim@step - a#1.stopLast();% + a#1_stopLast();% \else% \if@anim@loop - if(a#1.playing){% - a#1.seekFrame(0);% - a#1.setFps(\@anim@fps);% - }else{a#1.stopLast();}% + if(a#1_playing){% + a#1_seekFrame(0);% + a#1_setFps(\@anim@fps);% + }else{a#1_stopLast();}% \else - a#1.stopLast();% + a#1_stopLast();% \fi% \fi% \fi @@ -3098,33 +3103,33 @@ }% \if@anim@step\else% \if@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@anim@step\else\if@anim@meas a#1.stopMeas();\fi\fi% + a#1_gotoPrev=function(){% + if(a#1_seekFrame(a#1_idx-1)<0){% + \if@anim@step\else\if@anim@meas a#1_stopMeas();\fi\fi% \if@anim@palindrome% \if@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@anim@step - a#1.stopFirst();% + a#1_stopFirst();% \else% \if@anim@loop - if(a#1.playing){% - a#1.seekFrame(\@anim@maxframe);% - }else{a#1.stopFirst();}% + if(a#1_playing){% + a#1_seekFrame(\@anim@maxframe);% + }else{a#1_stopFirst();}% \else - a#1.stopFirst();% + a#1_stopFirst();% \fi% \fi% \fi @@ -3132,114 +3137,114 @@ }% \if@anim@step\else% \if@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@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@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@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@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@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@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@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@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@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@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@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@maxframe||!a#1.isPaused){a#1.stopFirst();}% - a#1.playRight();% + a#1_playFwd=function(){% + if(a#1_idx==\@anim@maxframe||!a#1_isPaused){a#1_stopFirst();}% + a#1_playRight();% };% \fi% %animation API for labelled anims @@ -3248,57 +3253,57 @@ if(typeof anim['\@anim@label']==='undefined'){% anim['\@anim@label']={% \if@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@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@maxframe||isNaN(f)){% throw new RangeError('Frame_number_not_in_allowed_range');% }% \if@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@method>\z@ a#1.on=0;\fi% just initialize a#1.on + \ifnum\@anim@method>\z@ a#1_on=0;\fi% just initialize a#1_on \ifnum\@anim@poster=\@anim@mtwo %poster=none - var ret=app.setTimeOut('a#1.seekFrame(-2)',1);% + ret=app.setTimeOut('a#1_seekFrame(-2)',1);% \fi% \ifnum\@anim@poster>\@anim@mone %poster=<num>|first - var ret=app.setTimeOut('a#1.seekFrame(\@anim@poster)',1);% + ret=app.setTimeOut('a#1_seekFrame(\@anim@poster)',1);% \fi% \ifnum\@anim@poster=\@anim@mone %poster=last - var ret=app.setTimeOut('a#1.seekFrame(\@anim@maxframe)',1);% + ret=app.setTimeOut('a#1_seekFrame(\@anim@maxframe)',1);% \fi% }% \if@anim@step\else% \if@anim@autoplayorresume% \if@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@anim@autoresume% }% \fi% @@ -3313,27 +3318,27 @@ } \def\@anim@@pcjscript#1{% #1: @anim@num \if@anim@step% - \if@anim@palindrome a#1.playsRight=true;\fi% + \if@anim@palindrome a#1_playsRight=true;\fi% \else - if(a#1.playing){ + if(a#1_playing){ \if@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@poster=\@anim@mtwo %poster=none - var ret=app.setTimeOut('a#1.seekFrame(-2)',1);% + ret=app.setTimeOut('a#1_seekFrame(-2)',1);% \fi% \ifnum\@anim@poster>\@anim@mone %poster=<num>|first - var ret=app.setTimeOut('a#1.seekFrame(\@anim@poster)',1);% + ret=app.setTimeOut('a#1_seekFrame(\@anim@poster)',1);% \fi% \ifnum\@anim@poster=\@anim@mone %poster=last - var ret=app.setTimeOut('a#1.seekFrame(\@anim@maxframe)',1);% + ret=app.setTimeOut('a#1_seekFrame(\@anim@maxframe)',1);% \fi% }% } @@ -3344,54 +3349,54 @@ /D <</S/JavaScript/JS (% app.focusRect=false;% disable focus rectangle \if@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 try{% \if@anim@step% \if@anim@palindrome - if(event.shift)a#1.playsRight=!a#1.playsRight;% - if(a#1.idx==\@anim@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@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@maxframe){% - a#1.stopFirst();% + if(a#1_idx==\@anim@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@anim@palindrome - if(a#1.idx==0)a#1.playsRight=true;% - if(a#1.idx==\@anim@maxframe)a#1.playsRight=false;% + if(a#1_idx==0)a#1_playsRight=true;% + if(a#1_idx==\@anim@maxframe)a#1_playsRight=false;% \else - if(a#1.idx==\@anim@maxframe&&a#1.playsRight)a#1.stopFirst();% - if(a#1.idx==0&&!a#1.playsRight)a#1.stopLast();% + if(a#1_idx==\@anim@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@upjscriptstring{% app.focusRect=false;% \ifx\@anim@action\@anim@EndLeft - a#1.stopFirst();% + a#1_stopFirst();% \else% \ifx\@anim@action\@anim@StepLeft - a#1.stepBwd();% + a#1_stepBwd();% \else% \ifx\@anim@action\@anim@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@action\@anim@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@action\@anim@StepRight - a#1.stepFwd();% + a#1_stepFwd();% \else% \ifx\@anim@action\@anim@EndRight - a#1.stopLast();% + a#1_stopLast();% \else% \ifx\@anim@action\@anim@Minus - a#1.fpsDecr();% + a#1_fpsDecr();% \else% \ifx\@anim@action\@anim@Reset - a#1.fpsReset();% + a#1_fpsReset();% \else% \ifx\@anim@action\@anim@Plus - a#1.fpsIncr();% + a#1_fpsIncr();% \fi\fi\fi\fi\fi\fi\fi\fi\fi% }% } |