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)