In my previous post, I covered a few simple techniques for adding Advanced Actions to Adobe Captivate 9 projects. We added hidden captions that appear when users click a button. Now we’re going to connect that interaction to the slide navigation, because our customer wants to make sure that users read every caption before they can move to the next slide. This request means we need to use a custom button and a Conditional Action.
- System Variables drive things like quiz score and page numbers.
- User Variables are triggered by the user doing something on the slide.
You can set up your Variables in two places. Select Variables from the Project menu, or open the Advanced Actions dialog box and click Variables.
In the Variables dialog box:
- Select User as the Type.
- Click Add New.
- Name the Variable.
- In the Value field, enter 0.
The Description is not required, but if you get into more complex Variables and Actions, this field will help make sure you’re using the Variable correctly.
- Click Save and then close the window.
In the first part of the Advanced Actions post, we built the Advanced Action as a Standard Action, but in order to link the variable and the navigation together, we need to convert the Standard Action to a Conditional Action (I’m using the same names for my new Conditional Actions, which means I had to delete the original Standard Actions first).
Access the Advanced Actions dialog box for your first button and select Conditional actions from the Action Name dropdown list. Notice that the area where you add the actions is divided into two sections. This is where the conditions are built. These conditions are based on an “If – Then – Else” relationship, but lucky for you we’re only going to use the “If – Then” part.
With a Conditional Action, you can have the object do several things at one time by creating new “decision blocks” where you can build your actions. We’re going to use two decision blocks for our action. The first decision block contains everything we had in our original Standard Action, so it will show the hidden text and increment our “click counter” variable by one.
For the first decision block, we are going to use an easy trick to build a Standard Action as a Conditional Action. I have found this trick to be quite helpful in building my understanding of Advanced Actions. If you build all of your Standard Actions this way, you can easily add conditional layers later on. The trick is to use the following relationship in the “If” section of a Conditional Action: “1 is equal to 1.”
Now you can build the second part exactly as you would for a Standard Action. Because 1 will always equal 1, the action will always be triggered, so it works just like a Standard Action.
Let’s recap the steps so far:
- Select Conditional actions from the Action Type dropdown list.
- Enter the Action Name.
- In the If section, click the Add icon.
- Select Literal and enter 1.
- Select is equal to.
- Select Literal and enter 1.
Now we need to build the Standard Action to make our text caption appear and increment our counter variable by 1.
- In the Actions section, click the Add icon.
- Select Show and select the appropriate text caption (Cookies_Text).
- Click the Add New icon to add a new row.
- Select Increment.
- Select your “counter” Variable (Next_Counter).
- Enter 1 in the blank field.
Variable + Conditional Actions
At this point Captivate is tracking the clicks that you associated with each button, but it’s not doing anything with that data just yet. We need to tell our project to show the Next button when the Next_Counter Variable hits a specific number. We’re going to create an action in a new decision block. You don’t have to name your decision blocks, but it’s a good idea to get in the habit.
To set up a new decision block to activate the Next button:
- Select a blank decision block.
- In the If section, select Variable and then select your “counter” variable.
- Select is equal to (you could also select is greater or equal to).
- Select Literal and enter 3.
- In the Actions section, select Show from the Action dropdown list.
- Select the Next button from the list of available objects.
- Click Save As Action.
- Repeat for each button.
Now when users click each button, the text appears and the click counter value is increased by 1. The action then looks to see if the counter value is equal to 3 – and when it is – the Next button appears.
Using Advanced Actions can seem intimidating at first, but if you tinker with them and explore their features, you’ll find yourself using them more and more. Do a little research to get ideas and make sure you understand the concepts (I found Rod Ward’s article quite helpful). Just take your time, stay organized, and you’ll find success quickly. If you have any tips about using Advanced Actions, I’d love to hear from you. Drop a comment below and check back soon for more!