Friendly warning: Welcome to developer territory.
The Display Rule allows you to make an annotation appear only under certain conditions. Common conditions include:
- Display when a viewer clicks on a different annotation.
- Display when the viewer gets a question right or wrong.
- Display based on a parameter passed in from an external API.
Here's a basic example. Clicking on one annotation will make another appear.
Here's a more sophisticated example.
How to do it
The first (or "target") annotation can be a text, image or hotspot annotation.
Set the Link / Evaluate expression field to something like
The second (or "destination") annotation can be any type - text, image, hotspot, iframe, even a quiz.
On this, set the Display Rule field to something like
The more sophisticated example has the following configuration:
Link / Evaluate expression:
player.pause(), displayTextBox=true, displayQuestionBox=falseDisplay Rule:
displayQuestionBox==true || displayQuestionBox==undefined
Destination AnnotationLink / Evaluate expression:
player.play(), displayTextBox=false, displayQuestionBox=trueDisplay Rule:
Start time and Duration for both the target and destination annotations are identical.