1 Reply Latest reply on Apr 25, 2016 1:56 AM by JR_Boulay

    How to create next and previous button for turning layers on and off?

    T.Pektas

      Hi,

       

      I have no idea how to create a javascript code for acrobat. Could someone help me to create the code for the discription bellow.

       

      Summary:

      How could I create 2 buttons, one to activate the visibility of the next layer and one to activate the visibility of the previous layer?

       

      What I have is:

      - One PDF page

      - 5 layers

      - 2 buttons

       

      What I want is:

      - that button 1 shows layer 1 by clicking it. When I click button 1 again it must hide layer 1 and show layer 2. When I click button 1 again it must hide layer 2 and show layer 3 and so on for the other layers...

       

      - button 2 must hide layer 5 by clicking it and show layer 4. By clicking button 2 again it must hide layer 4 and show layer 3. When I click button 2 again it must hide layer 3 and show layer 2 and so on for the other layer

       

      so if you understand button 1 must activate an action for showing the next layer and button 2 must activate the previous layer. In other words: I want one next button and one previous button for the layers on the page.