473,586 Members | 2,707 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 7141
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("fun ction(){if(glob al.animate){thi s.pageNum++}",5 0);

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.co m> wrote in message
news:ra******** **********@twis ter.nyroc.rr.co m...
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("fun ction(){if(glob al.animate){thi s.pageNum++}",5 0);

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.co m> wrote in message
news:ra******** **********@twis ter.nyroc.rr.co m...
Don Lancaster wrote: ..

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


var timer= setTimeOut("fun ction(){if(glob al.animate){thi s.pageNum++}",5 0);

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.co m> wrote in message
news:ra******** **********@twis ter.nyroc.rr.co m...
Don Lancaster wrote:
.

setTimeOut ("",50) ;
if (global.animate ){this.pageNum+ +} ;
var timer=
setTimeOut("fun ction(){if(glob al.animate){thi s.pageNum++}",5 0);

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
14587
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 needed). This webpage will call the site's homepage and refresh in 10 seconds. If I can see the homepage then, the site is up, else site is down. I have...
7
1977
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 user has to make his choice. Instead of letting him scan through this long list, we would rather let him type what he is looking for, while a...
14
4645
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 textarea. However, at the start, there is a delay of several seconds, before any of the buttons react to a click. After the first reaction has...
0
1562
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 JavaScript Using Visual Basic, Acrobat JavaScript Scripting Reference, Acrobat JavaScript Scripting Guide) but I'm having trouble using the examples...
1
1892
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 yyLayerScroll(daTarget, delay, ex, ey, dx, dy, sx, sy, daT, daLoop, daFirst ) { var yyX; var yyY; var target = MM_findObj(daTarget); if(!target.oritop){...
6
1667
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 8.1 (I think) of the reader. The problem is that when the browser is closed the reader doesn't close.
0
7839
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8202
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8338
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7959
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8216
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6614
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3837
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1449
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.