473,394 Members | 1,036 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Need a simple Acrobat JavaScript delay



I am conjuring up some simple JavaScript animation routies that work
entirely WITHIN Acrobat .PDF files.

They work very well but they are waay too fast! And are also CPU speed
dependent.

I want to present each page "cell" for, say, 50 milliseconds.

This "too fast" JavaScript set page action code works fine ..

if (global.animate){this.pageNum++} ;

This JavaScript set page action code does not work...

setTimeOut ("",50) ;
if (global.animate){this.pageNum++} ;

It returns a "ReferenceError: setTimeOut is not defined"

How do I do a simple (and CPU speed independent) delay as a page action?

--
Many thanks,

Don Lancaster
Synergetics 3860 West First Street Box 809 Thatcher, AZ 85552
voice: (928)428-4073 email: do*@tinaja.com

Please visit my GURU's LAIR web site at http://www.tinaja.com
Jul 23 '05 #1
5 7123
Don Lancaster wrote:


I am conjuring up some simple JavaScript animation routies that work
entirely WITHIN Acrobat .PDF files.

They work very well but they are waay too fast! And are also CPU speed
dependent.

I want to present each page "cell" for, say, 50 milliseconds.

This "too fast" JavaScript set page action code works fine ..

if (global.animate){this.pageNum++} ;

This JavaScript set page action code does not work...

setTimeOut ("",50) ;
if (global.animate){this.pageNum++} ;
var timer= setTimeOut("function(){if(global.animate){this.pag eNum++}",50);

Perhaps?

It's not clear what "this" refers to, since you haven't posted the whole
script, but if "this" refers to the global scope, I would guess that it
could be omitted.
Mick

It returns a "ReferenceError: setTimeOut is not defined"

How do I do a simple (and CPU speed independent) delay as a page action?

Jul 23 '05 #2


Mick White <mw***********@rochester.rr.com> wrote in message
news:ra******************@twister.nyroc.rr.com...
Don Lancaster wrote:


I am conjuring up some simple JavaScript animation routies that work
entirely WITHIN Acrobat .PDF files.

They work very well but they are waay too fast! And are also CPU speed
dependent.

I want to present each page "cell" for, say, 50 milliseconds.

This "too fast" JavaScript set page action code works fine ..

if (global.animate){this.pageNum++} ;

This JavaScript set page action code does not work...

setTimeOut ("",50) ;
if (global.animate){this.pageNum++} ;


var timer= setTimeOut("function(){if(global.animate){this.pag eNum++}",50);

Perhaps?


The initial error message refers to a case error, as I'm sure you know it's
spelled: setTimeout(.......)

--
S.C.
Jul 23 '05 #3
Stephen Chalmers wrote:
Mick White <mw***********@rochester.rr.com> wrote in message
news:ra******************@twister.nyroc.rr.com...
Don Lancaster wrote: ..

setTimeOut ("",50) ;
if (global.animate){this.pageNum++} ;


var timer= setTimeOut("function(){if(global.animate){this.pag eNum++}",50);

Perhaps?

The initial error message refers to a case error, as I'm sure you know it's
spelled: setTimeout(.......)

Oops.
Mick
Jul 23 '05 #4
Mick White wrote:
Stephen Chalmers wrote:
Mick White <mw***********@rochester.rr.com> wrote in message
news:ra******************@twister.nyroc.rr.com...
Don Lancaster wrote:
.

setTimeOut ("",50) ;
if (global.animate){this.pageNum++} ;
var timer=
setTimeOut("function(){if(global.animate){this.pag eNum++}",50);

Perhaps?


The initial error message refers to a case error, as I'm sure you know
it's
spelled: setTimeout(.......)

Oops.
Mick


The Adobe Acrobat JavaScript manual clearly says setTimeOut

Which is correct?

More likely possibility is that "" is unacceptable while "function()"
will get accepted.

--
Many thanks,

Don Lancaster
Synergetics 3860 West First Street Box 809 Thatcher, AZ 85552
voice: (928)428-4073 email: do*@tinaja.com

Please visit my GURU's LAIR web site at http://www.tinaja.com
Jul 23 '05 #5
Don Lancaster wrote:
Mick White wrote:
Stephen Chalmers wrote:
[snip]

The initial error message refers to a case error, as I'm sure you
know it's
spelled: setTimeout(.......)

Oops.
Mick

The Adobe Acrobat JavaScript manual clearly says setTimeOut

Which is correct?


Then "setTimeOut" appears to be part of the Adobe Acrobat DOM, not core
javascript.
Mick
Jul 23 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: long5120 | last post by:
I am trying to use webpage with javascript to check if a web server is responding. I was thinking of using 2 frames. Frame1 will have the site, and the Frame2 will be a status bar (not really...
7
by: denis | last post by:
Is there someone who could help with a javascript in Acrobat? The context is a PDF document containing an alphabetical list of 1000 titles (with individual links to other PDF documents) where the...
14
by: Rene Grothmann | last post by:
I have managed to communicate between forms and Java applets. A button press sends the content of the text area to an applet, a second button gets some text from the applet and puts it into the...
0
by: Per | last post by:
Is there anyone who's been able to program the new Adobe Acrobat Javascript (7.05) using Visual Basic in Access 2003? I have downloaded the documentation from Adobe's website (Programming Acrobat...
1
by: Rabel | last post by:
Hi I am updating some pages from a website that is a few years old and I didnt work on the site then, but the javascript works in ie but not in firefox. The scripting is function...
6
by: Andrew Poulos | last post by:
I'm testing the embedding of a PDF in a page <embed src="test.pdf" style="position:absolute; left:10px; top:10px; width:290px; height:390px;"> </embed> I installed acrobat reader version...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.