Sequence Check

Update

New version of this workflow, with example output to HTML5 and using new features can be found in this post:

Sequence Check slides (updated)

Intro

Another challenge on the user forum, http://forums.adobe.com/message/4387510#4387510:  "wonder if it is possible to have 5 click boxes on a slide that must be clicked in a specific order before the slide will advance?" Had to ask for some more details. There are no extra (wrong) click boxes on the slide, the check for a correct sequence could be done by using a Check button, and the Next button should appear on the slide only when the sequence of clicks is correct. The user wanted to have the possibility to check after 5 clicks or to have an 'intermediate' check after each click. I thought it also to be a good practice to disable a click box immediately after it has been clicked, since a double click on the same click box was not wanted. 
 

Example

Play with this SWF. You'll find two similar slides after the introduction slide. 
  1. On slide First the Check button will appear after having clicked on the 5 click boxes in the sequence you wanted. You can watch the number of clicks in a Text caption at the bottom. Once a click box is clicked it will be disabled. If your sequence is not correct, all will be reset and you can try again.
  2. On slide Second you'll have the Check button from the start and you can use it at any time. If the check results in at least one wrong click, you'll get a Reset button. After the last click, if the sequence was correct the Next button will appear.

Slides, objects, labels and events

Slide First: 

  • 5 click boxes (that cover up rectangle shapes). I labeled those click boxes in the sequence they should be clicked: first CB_1, then CB_2 etc; each click box will trigger an advanced action with the same label. That is only possible because the click boxes were labeled before the actions.
  • Buttons: BtCheck1 that will trigger the advanced action SeqCheck and button BtNext1 that has the action Go to Next Slide; both are initially invisible
  • Text Captions TCNumber (shows the number of clicks), that is visible and set to show for the rest of the project (also needed on slide Second)
  • Text Captions TC_Wrong/TC_OK1 that are initially invisible and used for feedback in the action SeqCheck

Slide Second

Because variables have to be reset, the On Enter event of this slide is used to trigger the Advanced action Enter2.
Almost identical to the first slide. Because the click boxes do get another ID, but trigger the same advanced actions CB1... for once I didn't even label them :-). The Text Caption TCNumber is still visible on this slide, because it was timed for rest of project. Other objects are:
  • Buttons: BtCheck2 (visible) that will trigger the advanced action SeqBis and button BtNext2 (invisible) that has the action Go to Next Slide
  • Button BtReset (initially invisible) that triggers the advanced action BtReset (same label possible because button got it first)
  • Text Captions TC_Some/TC_OKUntil/TC_OK2 that are initially invisible and used for feedback in the action SeqBis
 

Variables/logic

Only two user variables were created to be used for checking the sequence:
  1. v_counter: will count the number of clicks (correct or incorrect); this user variables is visible in the text caption TCNumber. For that reason I gave it a default value of 0, so that it will also show a value in the text caption when no click has occurred.
  2. v_correct: will be incremented when a click has been in the correct sequence. 
The first variable will be used twice in my logic:
  1. to check if the click sequence is correct, for the click box CB_1 that should be clicked first I check "v_counter = 1?", for CB_3 it will be  "v_counter = 3?' etc and increment v_correct if that is the case
  2. to check if until now the sequence was OK, which will be the case as long as v_correct is identical to v_counter

Advanced actions

CB_1, CB_2.... CB_5 

Those are  triggered by the click boxes with the same name on first slide, and also on second slide; similar conditional actions with 3 decisions:
  • Count is a mimicked Standard action, disables the click box, increments the variable v_counter and hides caption TC_Wrong if it has been made visible in a previous sequence.

  • Check as explained before will test if v_counter = n where n=number of the click box; if this is true, the var v_correct will be incremented; no Else action is needed.
     
  • ShowBtCheck  checks if  v_counter = 5 and if that is the case the button BtCheck1 will be made visible

     

SeqCheck

is  triggered by the button BtCheck1 is a conditional action with 1 decision Sequence
It checks if the variables v_counter and v_correct have the same value, which means that the sequence was totally correct. In that case the correct feedback caption TC_OK1 is made visible and the Next button.
 
If the condition is not fulfilled the other feedback caption TC_Wrong gets visible and everything is reset so that the user can try again:

  • v_counter and v_correct are reset to 0
  • button BtCheck1 is hidden again
  • all click boxes are enabled 

 
Enter2

is triggered on entering slide Second
This is a simple standard action, resetting the variables by assigning the value 0 to them.

SeqBis

is triggered by the button BtCheck2 is a conditional action with 2 decisions:

CheckUntil valid for intermediary checks, before all click boxes are clicked, will show the correct feedback caption (TC_Some, TC_OKUntil) and show the Reset button if the sequence is incorrect so far; this is a decision with an THEN/ELSE branching

End only will show the BtNext2 when all click boxes have been clicked and the sequence was correct.



BtReset

is triggered by the button with the same name on slide Second is a standard action that:
  • v_counter and v_correct are reset to 0
  • all click boxes are enabled 
  • Reset button is made invisible

Conclusion

In this example I really appreciated the duplicate and copy/paste functionalities of Captivate:
  1. Started with the first slide and the first click box. Created and attached the advanced action to that click box. 
  2. Duplicated the click box 4 times and positioned the duplicates over the rectangles
  3. Renamed each click box, opened the attached advanced action and duplicated that as well, renamed as well and edited
  4. For the second slide I duplicated the first slide
  5. Copied a whole bunch of statements from the SeqCheck to use in the BtReset action as well
BTW: I always use the scratch area to keep some information about variables, events, objects, actions in the CP-file

10 responses
Hi Lilybiri,
Thank you so much for the detailed instructions. I was able to make this work as I was hoping it would. I have one additional question that is listed below that I'm hoping you can answer. Thank you for your continued help.

Is it possible to set the TCWrong text caption to fade out after it's displayed? If the user clicks the boxes in the wrong order this displays and stays on the screen. I noticed that in your example on your blog yours did this also. I'm afraid that if it doesn't fade out the learner will think they're still clicking in the incrorrect order when they retry the sequence.


Kim
Kim, to have the fading effect will be complicated because applying effects with advanced actions is limited. Have tried it by creating a custom effect, which is very cumbersome to get available in the dropdown list for advanced actions. But still not functional. Another way would be by micro-navigation and will try to explain both in another blog post. There is also the issue of having a lag when applying a lot of effects by actions. Really, those are tough things to realize with advanced actions, hoping in the future to have a smoother work flow.
However if you just forget about fading, you can hide the TC_Wrong caption on the first click of the new sequence by adding the statement Hide TC_Wrong to each of the actions CB_1, CB_2....CB_5 in the mimicked Standard action, the decision Count. Will update this blog post that way.
Thank you. This worked very well and did just what I was looking for.

I have another question. In this scenario, I have 7 items on the screen that can be clicked. Each click branches to another part of the project and when that branch is complete the learner is returned to this slide. This allows them to go through each of the 7 topics in the order they choose.

I'm wondering if it's possible to set up advanced actions that would do two things. First I would like for a check mark image to display next to each click box after it's been clicked to help the learner remember which items have been viewed. The check could appear when the learner returns to this slide from the branch that corresponds to the click box, but each would need to stay on the screen until the learner has chosen each click box. I wasn't sure if this was possible since the clicks take the learner to different areas fo the project and then return.

I would also like to set it up so that the next buttonon this slide doesn't display until all 7 click boxes have been selected. The learner would not have to do this in a specific order, they would just have to select each one.

Thank you again for all of your help.

Kim

Thank you for directing me to the blog post above. Since I'm new to advanced actions do you happen to know if there are more details on setting up the advanced actions that are referred to in the post?

Kim

A lot of my blog posts are about advanced actions. I published some articles as well that explain more in depth and some of them offer practice files. A link to the list with articles can be found here:
http://lilybiri.posterous.com/articles-on-advanced-actions
Be sure to look at the two articles about the variables (7 and 8) and watch the video tutorial included in article 5.
I have been able to successfully program everything needed, with the exception of the next button. This would be like the end button in your example found here http://lilybiri.posterous.com/template-for-reusing-script. I'm hoping you might be able to help with that. Thanks.

Kim

Are you talking about the first or the second slide? Both conditional actions have to be triggered by a check button. Can you check the conditional actions using the screenshots I provided for SeqCheck (first slide) which is an action with only one decision, and SecBis (second slide) which has two decisions. Did you ask for the template you are referring to? You can send me a PM on the forum with your email address and the version (5 ot 5.5) you are looking for.
Works nicely. Thanks. A very useful tutorial
One question. If the sequence is 2 click boxes and 3 TEBs how would you approach? For example: The user has to hit a clickbox, enter text into 3 TEBs then hit a different clickbox.