Dropdown Interaction - tips

Intro

Recently I published some tips about learning interactions, including an explanatory table. The use case in that post showed how to use checkbox and radiobutton interactions. Last week, a user asked a question about the dropdown interaction, which he used for a custom question slide: How can I check if the user has chosen an item? That is not difficult for checkbox and radiobutton, because their associated variable will be empty, but the situation is different for the dropdown interaction, hence this tutorial.
The most common failure that I detect on debugging advanced/shared actions with multiple decisions are due to a wrong understanding of the validation of those actions:
  • all decisions will be checked from left to right
  • there is no way of jumping out of the action when a correct condition is met.
In the use case from the example movie, that sequence behavior is very important!

Dropdown interaction

The properties dialog box is pretty limited:

In this example you see that:
  • entries are separated by commas
  • formatting allows to choose a font, font style and attribute (faux style), but font size is limited to 14pt maximum
  • the color dialog box doesn't show theme colors
  • the update button allows to see a preview of the look after formatting
  • if you want to validate the choice in the list, you need an associated variable (here v_drop); beware: you have to create the variable in the Variables dialog box
  • the first sentence mentions 'combobox' but as I understand the word combobox this is not correct: in a combobox you can not only choose from a list but you can type in a word (there was an older combobox widget), this learning interaction doesn't allow that.
Maybe you are bit puzzled by the first entry 'Choose a language'? Contrary to the radiobutton/checkbox interactions, the variable associated with a dropdown is never empty! By default it has a value equal to the first item in the list. In the example movie, you will see before choosing, and after resetting that v_drop is equal to 'Choose a language'.

Resetting: it is indeed possible since this latest version of Captivate not only to change the value of a variable by an action, but also to have this change reflected in the Display of the interaction. This new feature is used for the Clear button in the example movie.

Beware: for some reason, the first time you use the interaction you will have to click twice, first click to put focus on the interaction, second click to select item. Strange :)

Example Movie

This movie has only 4 slides. After the 'Intro'-slide you can choose a language on slide 'Drop'. Watch the variable v_drop that is visible in a text caption next to the learning interaction. You get 3 attempts to guess the correct language, reason for the variable v_attempts. The 'Drop' slide has two interactive objects: Submit and Clear. Try out Clear to see how the interaction is reset to its initial state. You can click Submit without choosing a language, you can choose a wrong language or the correct one. The third slide you'll only see when your answer is correct. If you exhaust the three attempts without correct result, you will end up at the 4th slide 'Retry', where you are able to get back to the 'Drop' slide and start guessing again.

Variables

Here is a screenshot of the user variables

As explained before v_attempts tracks the number of attempts and starts with value=3, v_drop is the associated variable for the dropdown interaction.

I used v_dummy, a variable containing the text  'Choose a language' out of laziness, to avoid having to type that text over and over again. Be careful: it has to be exactly the text in the first item, it is not possible to use a variable in the item list.

The variable v_groet is used on the third slide, to customize the text based on the current time of the user (cpInfoCurrentHour). The variable v_wrong is a Boolean (value=0) that will be set to 1 when the attempts are exhausted without finding the correct language.

Events and Actions

EnterDrop, triggered On Enter for slide Drop

This standard action resets everything on the second slide 'Drop': the group Gr_Feedback with empty, wrong and correct feedback messages (empty, wrong, correct) is hidden, group Gr_Bt with the two interactive objects made visible, variables v_drop and v_wrong are reset to the default values.

ResetAct, triggered by the Success event of the Clear interactive object

A standard action that restores v_drop to its default value and hides the group Gr_Feedback.

CheckSubmit, triggered by the Success event of the Clear interactive object

This conditional action has 5 decisions, one for each possible situation:
  1. EmptyDone if the user clicked on Submit without making a choice and it was the last attempt
  2. Empty if the user clicked on Submit without making a choice and there are still attempts left
  3. Correct
  4. WrongDone if the user choose a wrong language and it was the last attempt
  5. Wrong if the user choose a wrong language and there are still attempts left

The Sequence is important: if you put Empty before EmptyDone, it goes awry if it is the second attempt, because Empty would have decremented v_attempts and that means that EmptyDone would result also in a True condition, and user will lose an attempt. Same for WrongDone and Wrong, they cannot be switched. 

ExitDrop, triggered by On Exit event of slide Drop

Exceptionally I use the On Exit event, because in this case it will function perfectly. 
A simple conditional action, based on the value of v_wrong.

More...

There is a simple Jump to slide 'Drop' on the last slide. Resetting will happen with EnterDrop action.

The third slide has an On Enter action, to show the right caption based on the system variable cpInfoCurrentHour. 
Do you accept the challenge to figure out that (conditional) action? No need to use my tongue :)

Tips - Learning Interactions

Intro

Captivate 8 has included several learning interactions, that are not well documented in the official Help. You'll be able to download a descriptive table at the end of this article. In the past I have been blogging quite a few times about using Widgets. And there was a similar article 'Using Captivate Widgets? Some tips'. Learning interactions is the name used by Adobe to indicate widgets that are compatible with SWF and HTML5 output, whereas the former Widgets were meant for SWF output. Some of the widgets are still available, others have been replaced by a learning interaction. Widgets can be found in the Gallery\Widgets under the installation folder of Captivate. Learning interactions can be found also in the Gallery, but you'll use them from a duplicate folder in Public Documents, which is easier to access if you don't have full administrative rights. 

In this article I'll offer some general tips. You will see an example movie, using the Radiobutton and Checkbox interactions but I will not explain in depth the advanced actions used for that example. 

Inserting Learning Interactions

There are two possible work flows:

  1. In the Big Button Bar, use the button Interactions, last option. A dialog box with thumbnails of all interactions will be opened. You'll see a badge 'New' or 'Updated' sometimes, when a new version has been pushed to your system.
  2. From the Insert menu, choose Widget and if necessary browse to the appropriate folder. I'm on Win7, you see the folder in top of the screenshot:

The second work flow is also valid for Widgets, and can be used also if you have problems with the Thumbnails dialog box not showing up. I also prefer it because scrolling through a list with names is more efficient than with the other dialog box. Which work flow you prefer, you'll see the the dialog box to edit the properties and parameters for the interaction popping up. In this screenshot you see the dialog box for a simple radiobutton interaction with 2 options (True/False). I unchecked Highlight because that puts a rectangle behind the words 'True' and 'False'. This is one of the interactions that has an associated variable, labeled v_one in this case.


Associated Variables

As you'll see in the table, several interactions have one or more associated variables. In combination with advanced/shared actions this gives you lot of possibilities for using the interactions. You can have a look at the example movie, using both the radiobutton and checkbox interaction. 
As I warned already in the article Tips about widgets, mentioned above, those variables are not created automatically because you type their name in the Properties dialog box, you have to create them in the Variables dialog box as well. The type of the variable is mentioned in the reference table that you can download from the link at the end of this article. 

Example Movie

After the title slide you'll see a slide with 3 Radiobutton interactions to create T/F questions. The Next button triggers a rather complicated conditional advanced action that covers all possible situations:
  • if the user clicks without answering any question
  • if all questions are answered with False (they are mutually exclusive)
  • if more than one answer is True

If you want to test all possibilities you'll have to refresh the browser several times.

I'm using the new possibility to control the display of the radiobuttons, they can now be cleared by controlling the variable.

On the third slide I use the Checkbox interaction, and if you choose the first option (Captivate 8.0.1) on the radiobutton slide, the first option will already be checked for you, another application of controlling the display, in this case using the same user variable for the first T/F radiobutton and the first option of the Checkbox interaction. The advanced action triggered by the Next button will navigate you to another slide, either slide 4 or 5 as you'll find out.

I added a text container with the four user variables v_one...v_four to show how they are changed in the movie.

Resizing - Refresh Widget

When using the interactions Radiobutton, Checkbox, Dropdown and Scrolling Text you'll often need to resize the interaction on the stage to make everything visible. The placeholder on the stage then can look very distorted, discover the Resize Widget button in the Properties that will appear after each resizing to have the placeholder adapt to the new size:


Customizing - Theme colors

All learning interactions can be customized, at least concerning the colors used. New in Captivate 8 is the possibility to have the Theme Colors palette applied to the interactions. I mentioned this already in the article about: Theme Colors. In the table I indicate which interactions do have that new feature. It is not the case for the Checkbox, nor the Radiobutton interaction. You can see the option in this screenshot of a Glossary interaction:


Improvements for Responsive Projects

Some interactions recently got an update to improve the user's experience when used in Responsive projects. You'll also find indication about that in the table. Whenever you see the option 'Scale Text for Responsive Projects'. On the screenshot of the Glossary interaction that option is visible.

Static versus Interactive interactions

In the former Widgets panel, which disappeared in the new UI of Captivate, you could see that widgets existed in three types: Static, Interactive and Question. Interactions have only two types: Static and Interactive. The difference is the same as for the standard objects: an interactive object (shape button, click box, button, Text Entry Box) has events that can trigger an (advanced/shared) a action and can have a score that can be added to the Quiz total. Non-interactive or static objects do not have those two features.

Most learning interactions are Static. Only the Games (with exception of the old Word Search interaction) are Interactive. Beware: although the score for some Games is stored in the associated user variable, you cannot add that score to the Quiz total. The points attributed to a Game in the Reporting section, are granted to the user in the same way as most questions in Captivate (with exception of the MCQ): black-white. If the game has been played, the user will be awarded the points, whatever the score of the game was.

Table - categories

You can download the table here. The categories are my personal choice:

  1. Interactions without variables
    1. Objects: several small interactions
    2. Display: interactions like accordion, tabs... that allow you to show a lot of info on one slide
  2. Interactions with variables: most of my favourites are here like the checkbox, dropdown, radiobutton and scrolling text
  3. Games (with or without variables)

Drag&Drop is to me also an interactive interaction, but because of its importance and different work flow it is not in this table.

Waiting for your comments :)