[pdftex] [CTAN] animate

James Quirk jjq at galcit.caltech.edu
Sat Mar 17 06:32:05 CET 2007


> I found an extremely strange problem with the Javascript in your
> documentation and with examples which I regenerate.
> 
> 1)They work perfectly with Adobe Acrobat 8 on Mac
> 
> 2) They do not not work with Adobe Reader 8 on Mac (Javascript is
> enabled and it complains that security settings prevent JS from being
> executed and then that "a0000.actnNext is not a function" (and exactly
> the same for all other functions). Javascript in "other" files works
> without any complains.
> 
> 3) Exactly the same with acroread 7.0.9 on Linux (cannot be more
> specific), JS is enabled and the same complains
> 
> 
> I am really puzzled by this different behavior of js in Acrobat and in
> the Reader. Any explanations?
I suspect that the definition of a0000.actnNext and its invocation
are in two separate JavaScript objects. And the parsing of the
object containing the function definition is terminating prematurely,
when using Adobe Reader, owing to the security settings error. Thus 
resulting in the "not a function error." Note that the JavaScript security 
error applies to individual methods (e.g., app.addMenuItem) and
has nothing to do with whether or not JavaScript is enabled.
To track the problem down you could always add a try/catch block
around the offending code. The error message should pinpoint the
offending method. Then you could check to see if Adobe's
JavaScript Reference makes a distinction between Acrobat and Reader
for the method in question. Alternatively, if you can distill
the problem down to a minimal PDF, ship it to me and I'll take
a look at it.

James



More information about the pdftex mailing list