We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Navigation Arrows

Home Forums General Questions Navigation Arrows

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #86950
    emadamsinc1
    Customer

    I am trying to use puzzles to create navigation arrows that cause the next annotation in a series of 10 to open as the right button is clicked and cause the annotations to open in reverse as the left button is clicked. I am not sure how to set this up in puzzles or if I need to be using a combination of custom javascript with a puzzle

    something like this:

    on click of r-button
    do
    set previousIndex to currentIndex ← save old index
    set currentIndex to currentIndex + 1 ← move forward

    if currentIndex > length of annotations – 1
    set currentIndex to 0 ← wrap to start

    close annotation (item previousIndex of annotations)
    open annotation (item currentIndex of annotations)

    on click of l-button
    do
    set previousIndex to currentIndex ← save old index
    set currentIndex to currentIndex – 1 ← move backward

    if currentIndex < 0
    set currentIndex to length of annotations – 1 ← wrap to end

    close annotation (item previousIndex of annotations)
    open annotation (item currentIndex of annotations)

    Attachments:
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.