These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Inserting Pages

fran33
fran33's picture
Registered: Aug 24 2011
Posts: 19
Answered

Hi,
 
In the same page I have two 3d scenes and two buttons that activate and desactive each one.
 
the instructions are
 
getAnnots3D(0)[0].activated = true;
getAnnots3D(0)[1].activated = false;
 
(for the first scene)
 
getAnnots3D(0)[0].activated = false;
getAnnots3D(0)[1].activated = true;
 
(for the second scene)
 
It works great.
 
Now I insert the page that contains the two 3d scenes in a general catalog with 190 pages. The new inserted page is located at page 174
 
I understand that I have to rewrite the javascript for des/activate as follows
 
getAnnots3D(174)[0].activated = true;
getAnnots3D(174)[1].activated = false;
 
(for the first scene)
 
getAnnots3D(174)[0].activated = false;
getAnnots3D(174)[1].activated = true;
 
(for the second scene)
 
where (174) says the page number.
Sadly it does not work.
 
Is it anything that I am missing.
 
Thanks in advance

My Product Information:
Acrobat Pro Extended 9.0, Windows
Shlomo Perets
Shlomo Perets's picture
Expert
Registered: Feb 8 2007
Posts: 18
Accepted Answer
As the page numbering in Acrobat JavaScript is zero-based, page 174 should be referred to as 173.

If the links and the 3D model are on the same page, you can use this.pageNum to refer to the current page number, whatever it is (with no edits required after you move/add pages). For example:

getAnnots3D(this.pageNum)[0].activated = true;



Shlomo Perets, http://www.microtype.com
Acrobat training & consulting