September 14, 2018
Custom Short Answer – Scrolling Text
September 14, 2018
Custom Short Answer – Scrolling Text
Lieve is a civil engineer (ir) and a professional musician. After years of teaching and research (project management/eLearning/instability) she is now a freelancer specializing in advanced Adobe Captivate as trainer and consultant. Her blog is popular with Captivate users worldwide. As an Adobe Community Expert and Adobe Education Leader, she has presented both online and offline. Since 2015 she is moderator on the Adobe forums and was named as Forum Legend (special category) in the Wall of Fame. In 2017 Adobe Captivate users voted for Lieve as a Top Content Experience Strategist.
Legend 245 posts
Followers: 396 people


I wrote this article a while ago, but thought it would be interesting to post it here in the Community to show the power of this Learning interaction. Reason: several users recently asked about using short answer questions to store reflections from the learner, to be used later on. Although this can be done with regular quiz slides, there is a problem: you would need to transfer the content of the system variable cpQuizInfoAnswerChoice after each slide to a user variable. More details in another, very old article.
I have already written multiple times about creating a Custom Short Answer Question. The default type in Captivate is pretty limited:  the user should enter exactly the same answer as the defined correct answer which is almost impossible with this type of question. The normal validation for such a question is to check if some keywords are present, and eventually if some other keywords have not been used. My previous posts were created with Captivate 5 for publish to SWF only:

Widgets were meant for SWF-output only, including the widget by Jim (this one, he has some widgets that are also compatible with HTML5). Since Captivate 7 the TextArea widget got a companion, the ‘Scrolling Text Interaction’. Don’t be confused by the name, it is essentially the same widget, but compatible with HMTL5 output.

I found a challenge from a Captivate user on the forum, concerning the use of TextArea (or Scrolling Text) with a more complicated condition than the one I described in the previous blog posts: How to verify that a variable “does not contain” a value? As you probably know, the operators in the IF part of a conditional action are somehow limited: there is an operator ‘contains’ but no negative counterpart. My first reaction was to propose the use of JS, but my intuition told me I should also try with advanced actions. This post will explain how I solved that problem, and I was very happy when the King of Javascript in Captivate, Jim Leichliter posted his alternative with JS in the same thread, scroll down to find the script.

Here I will explain the conditional advanced action, and update my old screenshots with those valid for CP2017 and CP2019.


The description of the problem: ” We are basically validating the content in the widget and showing appropriate feedback. Since the user can enter anything in the widget, we are only tracking the keywords. To be precise, we are trying to create an Advanced Action like this, where the text entry should contain the words Organizational, Behavioral, and Managerial but not the words Transformation and Non-Compliance. If the entry contains any of the “illegal” words, then incorrect feedback caption should appear.”
Translated: when the answer is submitted, the conditional action should show a Positive feedback when:

  • the three first words are included in the text
  • the last two words are not included in the text

If those conditions are not all fulfilled, the Negative feedback should be made visible.
Because of the missing operator ‘does not contain’ this cannot be done with one decision, one IF combination using AND, which explains why the user was stuck.

Solution ‘Divide et Impera’ 

After a long career as professor, this has become one of my mottoes: make it simple by splitting up the problem:

  1. Check first if all the conditions are fulfilled and store that result in a Boolean variable. There are a lot of Booleans in Captivate: variables that can have only two values, No/Yes, 0/1, False/True. I will mostly choose for the 0/1 combi. I created a user variable v_TA_OK with a default value of 0 (meaning all conditions are not yet OK)
  2. Show the appropriate feedback based on the value of that Boolean.

This was possible because of the typical way Advanced actions are executed in Captivate:

  • all statements are executed in sequence and
  • all decisions are executed in sequence
  • the action is not stopped when a positive condition is met

This has led to a conditional advanced action with three decisions.

Example Movie

Watch this movie (rescalable HTML): it has 5 slides. After the title slide you will be able to enter 3 words that need to be included in the short answer, and two words that have to be excluded from the answer. On the third slide you can review the words, and eventually return to the previous slide to edit them. In the 4th slide, the question for the short answer appears. After submitting the answer the end slide will show if you succeeded or not.



To make the question more universal, I didn’t use literals for the words, but stored them into variables. These variables were created:

  1. v_OK: the Boolean variable explained above; default value = 0, will only be set to 1 if all conditions result in correct.
  2. v_answer to be associated with the  Scrolling Text interaction that will capture the short answer (slide 4)
  3. v_in1v_in2v_in3 to store the words (can also be more words in one variable, but they’ll have to appear in that sequence) that have to be included in the answer, associated with the three green Scrolling Text interactions on slide 2.
  4. v_not1 and v_not2 for the words that are forbidden in the short answer  (red Scrolling Text interactions on slide 2)
  5. v_null: an empty variable that is needed to create conditions for the other advanced actions (as the ones that check if all word fields have been filled); I will not explain those actions here; more info: Where is Null?

Advanced Actions and events


This action is triggered by the Success event of the Done button on slide 2. It checks if any of the Scrolling Text interactions has remained empty, and launches a message if that is the case:


Triggered by the Success event of the Done button on the Short Answer slide (slide 4). It is the action with three decisions:

The first decision checks if all the words that have to be included are indeed in the short answer, using the AND operator. If that is the case the Boolean variable is set to 1. The second decision can override this, setting the var back to 0 if any of the words that are not allowed are included, hence the OR operator. The last decision will show one out of two Next buttons, the workflow I have invented many years ago in this article.

I detect that many users have taken over that workflow, which is great. If the short answer is correct, the Next button has an attached score (here 10 points), if not it has no score. Using this approach the score and percentage  recorded in the Quizzing system variables will be correct.


This action is triggered by the On Enter event of the last slide (which shows the feedback). To prove my previous statement about system variables I used the quizzing variable cpQuizInfoPassFail in this conditional action:

For the feedback message I used a shape with three states. The Normal state has no content. Although it is not possible to apply an effect to a state, you can apply an effect to an object after having changed to the wanted state.


Variables are case sensitive, and contrary to validation of a Text Entry Box it is not possible to get rid of that case sensitivity for variables associated with this interaction. If necessary you’ll have to create more decisions.
I wanted to emphasize the importance of sequence by this blog post, and the fact that Captivate will always evaluate all conditions/decisions. This is not always the case in normal programming languages. Trying to explain:

  • The first decision is positive, variable v_OK will be set to 1, but there will not be ending of the condition
  • If the first decision is negative, variable v_OK will remain at 0, no need to include an ELSE part.  This means that the variable can never be set to 1 anymore, but the second decision will nevertheless be checked by CP.
  • If both negative words are not included, nothing happens with the second decision, v_OK will keep its value 1 or 0 depending on the result of the first decision, because there is no ELSE part.
  • If one of both negative words are included, the second decision will reset v_OK to 0, whatever its value was at the end of the first decision
2018-10-25 16:50:49
2018-10-25 16:50:49

This solution has not yet been ‘stolen’ from me.  I got congratulations for the idea from JS experts. It was used by the user who asked for this solution, and he was happy to be able to do it with Advanced actions, no need for JS.

2018-10-25 16:48:35
2018-10-25 16:48:35

This is a brilliant solution. Have you heard of anyone implementing something like this?

Add Comment