|
Javascript Buttons for 3d PDF help
Hellow all. New to the forums and java as well, hopefully I have come to the right place. I've recently started using the 3d PDF Animate plug in for Adobe Acrobat. If you aren't familiar with it, Tetra4d.com is their website. The program allows you to animate a 3d object that you import into a PDF on a very basic level (scale, rotate, translate).
The problem I am having is that the buttons you insert into the PDF to control the animation are very rudimentary. It has Play, Play All, Pause, Previous, Next, First, and Last. All the buttons are java, and I have the option of editing them or creating a new button from scratch. I, however, have exactly not experience with java and all my efforts to learn what I need have ended in nothing.
Here is an example of the Play button
var A3D = getAnnots3D(0)[0];try{A3D.context3D.playStep();}catch(e){};
I think A3D is the name assigned to the animation. Conext3d, i think, is referring to the 3d space(think text box, but for the imported model). I have no idea what getAnnots3d(0)[0] is. Step is referring to a single animation. Ex. You have a house with a window and a door, opening the door would be step 1, opening the window would be step 2. The play button only plays the current step, to play the next or previous step, you have to click the next or previous button.
Here is the PlayAll Button
var A3D = getAnnots3D(0)[0];try{A3D.context3D.playAll();}catch(e){};
Adding a value in the .playall() does nothing, in fact it ends up breaking the script and it plays nothing.
What I am trying to do is to make a button that can play specific Steps without having to click next or previous to find it. Ex. Button 1 plays steps 1-3, button 2 plays step 4-5 and the like.
Hopefully this is enough info, if you need anything else, or want to see the script for other buttons I can post that too.
|