Replay or Reset slide?

Update

For a hands-on experience, have a look at the recent post with a Captivate tutorial about this topic.

Replay/Reset Slide tutorial

Intro

A frequently visited post on my blog is ‘Replay (slide) button‘, which was published 5 years ago. Such a button is not available out of the box in Captivate.  In that blog I explain two possible scenarios. The second scenario will be close to what is explained in this new post as a 'Reset' scenario. Since some features have changed, time to refresh. I will focus here more in-depth on the difference between Replay and Reset.

Companion tutorial:  to make this textual post more 'visible', I created a Captivate tutorial, which allows you to explore the difference between Replay and Reset (with or without On Enter action) on several examples. It can also be considered a summary of this blog, since the content slides (and assessment slides) treat this topic Replay/Reset. This is the link:

Replay slide

Many years before I already posted a simple way to replay a slide as well, and often I see users still using this two-line advanced action (which could also be a perfect Shared action, without any parameter):

Expression cpCmndGotoSlide = cpInfoCurrentSlide – 1
Continue

Whether you need the command Continue depends on the setup of the slide. If you leave it out, the play head will remain paused at at the first frame of the slide.

The advanced/shared action is essentially a translation from a still older action. , where more system variables starting with ‘rd’ existed, allowing a simple action instead of the one shown above. Reason: besides the cpInfoCurrentSlide, there was a second system variable rdInfoCurrentSlide. The first one was meant only to show the slide number, and for that reason starts its index with 1. The rd variable, like most system variables, starts its index with 0. , The simple action was:

Assign cpCmndGotoSlide with rdInfoCurrentSlide

Common misunderstanding is that this action will also ‘reset’ the slide which is NOT the case unless for very simple slides. Main reason: the play head never ‘re-enters’ the slide. Re-entering the slide is necessary to restore the original situation, either automatically, and/or by having an On Enter action being done again.

Reset slide

Hope we use the same terminology. Reset slide to me is to restore the slide to the situation it had when you first entered the slide.  During the first visit of the slide lot can have been changed. Here is a not exhaustive list:

  • Some object, originally hidden are now visible, or the reverse situation: originally visible, now hidden.
  • Multi-state objects were changed to another state, both custom state or InBuilt state (think about the Visited state of a button).
  • Effects have been applied to objects or groups, which can have those objects being in a different location if the effect included a motion path.
  • Knowledge Check slides have been answered. I will not talk about regular question slides, because those cannot be reset on slide level, only on Quiz level
  • Drag&Drop slides set up as Knowledge Check slides have been answered. Same restriction for D&D slides setup as scored questions (quiz level needed). I hear you! You can add a Reset button to a D&D slide, indeed, but that will not reset everything if you used Object Actions.

Essential for resetting is to re-enter the slide, to have the playhead revisit the On Enter slide event. For some of the described items that will be sufficient, for others it will be necessary to add an action On Enter. I demonstrated this situation in the recent presentation at Adobe eLearning World. You can find the recording still online in this portal. I will explain how to re-enter the slide (2 workflows).

Re-enter Slide (workflows)

Two workflows are possible (explained only the second one in the old post, but it has failed at least in one of the more recent releases and pushed me at the first workflow):

Dummy slide

Easy workflow, step-by-step:

  • Insert a duplicate of the present slide before the present slide
  • Take out all interactive objects of that slide, it should not have pausing points.
  • If there is an On Enter action, delete it and get back to ‘No action’ or ‘Continue’ (same result)
  • Reduce its duration to 0.1 secs which is the shorted possible duration.
  • Attach this  action to the Reset/Replay button:

Go to Previous slide

The play head will rewind to the dummy slide and since it is so short almost immediately (re)enters the present slide.

Drawback: you increase the number of slides. That may be annoying if you show the number of slides (cpInfoSlideCount) and/or if you use the TOC (where you’ll have to hide the dummy slides). I started using this approach in a version where micro-navigation had problems in HTML5 oiutput.

Tip: to avoid annoying flickering in case of low bandwidth, prefer a similar look for the dummy slide as for the present slide. I mostly use a duplicate, taking out all interactive objects and actions.

Micro-navigation

It is bit more complex but avoids adding slides. Workflow:

  • Create a user variable v_start. It will be used to store the first frame of the slide.
  • Use the On Enter slide event for this command (eventually to be combined with other commands) 
         Assign v_start with cpInfoCurrentFrame
  • For the Replay button use this command:
         Expression cpCmndGotoFrameAndResume = v_start – 1
    The play head will rewind to the frame before the start frame of the slide, which is the last frame of the previous slide. Due to ‘Resume’ in this system variable of the Movie Control category, the play head will continue and re-enter the slide immediately.
    It may prove necessary to increase the '1' to 2 or 3 if you don't get the expected result. It is possible that the value of the first frame is one or two frames wrong. In most cases however it works fine.

The variable and the actions can be reused on all slides.

What is reset?

As mentioned before, some items will reset automatically when re-entering the slide by one of the described workflows. Here a non-exhaustive list from my experience:

  • Multistate objects: if you keep the default setup where ‘Retain state on slide revisit’ remains unchecked. The normal state will re-appear as in the first visit of the slide. I have some blogs around which use that as an alternative for a Show/Hide scenario.  Drawback: if you use the InBuilt state ‘Visited’ it will also disappear in this situation.
  • Knowledge Check slides:  will be completely reset, ready for a new attempt. 
  • Drag&Drop slides: are completely reset, including eventually changes to objects due to Object actions. That is not the case with the generic Reset button which can be added to such a slide.
  • Effects: as you know they can be added with three types of triggers. The easiest one, based on timeline will not need a Reset action, will be reset with a simple Replay action. However both the button triggered Effects and Effects triggered by an advanced or shared action need to re-enter the slide to have them reset to their original situation.
  • Text Entry Boxes:  if you change the value of the associated variable, that change is never visible right away but will now be correct after re-entering. Same for the variables of learning interactions like checkbox and radiobuttons. Not really ‘reset’, more of a ‘refresh’.
  • Web objects: they will be reset to the first web page, which opens with indicated URL. If you use Replay that will not happen.
  • Animations like OAMs

What is NOT reset?

  • Multistate objects: if you check the option ‘Retain state on slide revisit’ for the object.
  • Hide/Show: items that have been shown or hidden during the Play head travel in the first visit will remain in that status.
  • Enable/Disable: if this command has been used for interactive objects, they will remain in that state. I showed this in the presentation ‘Deep dive with Shared and Advanced Actions’ at the Adobe eLearning world conference: if you disable all interactive objects, the pausing points disappear and nothing will stop the play head.
  • Variable values: they will not be reset to their original value.
  • Score: if you have scored objects on the slide, the total score including this score will not be decreased.

How do you reset these items: by creating or editing the On Enter action. That is beyond the scope of this shorter blog. You can see multiple examples in some slides of the Quick Start Projects, or on my blog including the sample project I added to the mentioned presentation. I include that project here as well. Check the On Enter actions (and the consequence of missing such an action on the first slide).

Look out for a Captivate tutorial to illustrate the difference for several of the mentioned items. It will be published soon on this blog.


Scrolling Text Interaction to replace Text Entry Box

Intro

Although I have already posted about one Submit button for multiple TEB’s, recently users tried to apply that blog to non-validated TEB’s, which was not the goal of that original post. Moreover giving another attempt to a TEB where the Submit has been done has become less easy with HTML5 output. SWF output had so many advantages (rewinding the playhead a couple of frames was simple), but that is the past.

Instead of writing long answers to the most recent thread, to explain why choosing Scrolling Text Interactions was a better choice for non-validated fields, I created a short example file. The workflow explanation will be in this article..

This example was created with version 11.5.0.476, the most recent version of Captivate. I uses some image and button assets from the new Assets panel. However, nothing has changed for interactions in this major update to version 11. I am confident that the solution will work for every version since 8, meant for HTML output.

Example

File has two slides. Only the first slide is relevant for the workflow, the second is meant to test the Continue button (with action "Go to Next Slide").

The first slide has three fields to fill.  If any field remains empty, a textual warning will appear and you can retry. The Continue button appears when all fields have an entry. Project has no poster image, just the default play button. It is not rescalable. Here is the link


Setup

Variables

For three fields you need 3+1=4 user variables, none of them needs a default value in its definition:
  • v_one, v_two and v_three will be used witl be associated with the Interactions
  • v_null is needed for the advanced conditional action to test if the field is blank; more info in ‘Where is Null’

Scrolling Text Interactions

Next to each Text container (used a shape) an instance of the Scrolling Text interaction. Here is a screenshot of the setup of the first of them. Important is to link one of the variables and to uncheck the option ‘Read only’:

You see in the dialog box that I edited the font (used an Adobe font), the font size and attribute.  Just a reminder: it is not sufficient to type in a variable name to define it, you need to define it in the Variables dialog box. 

Although I resized the interactions to the same height as the Text containers with the questions, the height is decreased in the output file. Be careful with copy/paste to duplicate an interaction, prefer the Duplicate functionality within Captivate (CTRL-D).

Advanced Action

This action is triggered by the Submit button. I used the On Enter event of the slide to hide the warning that will pop up if at least one field is empty. This is the Preview dialog box. The operator 'is equal to' is replaced by the JS equivalent needed '=='. The logical operator OR is replaced also by its JS equivalent |  As you perhaps know, an advanced action will be converted to JavaScript on Runtime.

The replacement of the grayscale image by the color image, disappearing items on the slide: all is achieved using  the timeline. For those interested, here is a screenshot of that timeline, I didn't group any items, but their label clearly shows what they are.

Conclusion

As usual I appreciate any comment, whether to add an alternative or to ask questions. You are welcome on my website as well.

Text Entry Boxes: Back to Basics

Intro

Reasons for this article are multiple. I watched a basic tutorial yesterday that skips a very important step and includes a cumbersome unnecessary workflow. Lot of questions appear on social media including Adobe forums and eLearning community. Lot of my tutorials for Text Entry Boxes include example files published to SWF, and were written for older versions. Time to translate everything to the most recent version (11.0.1.266 today) and for HTML output because there are minor differences. This first article is very basic, meant for newbies or for more advanced developers to refresh their memory.

Validated or Not

Text Entry Boxes are Interactive Objects. It may be a bit confusing since CP8 (change of UI) that you have to find them under the Text Button, not on the Interactions button. There are a couple of ways to recognize interactive objets:

  • Their timeline (when not selected) is green
  • In the Properties panel you have a tab Actions, allowing to trigger one or two actions
  • You can turn on Reporting in the Actions tab. A score attached to the objet (default = 1pt) can be added to the total quiz score.

Text Entry Boxes allow to let the learner enter text, which will be stored in an associated variable. This means that it the value can be used later on. It is one of the two interactive objects that will be automatically inserted when creating a software simultaion in Training or Assessment mode (the other object is the click box), whenever the learner is required to fill in a field. In Captivate tthe only other ways to allow learners to put in text is by using the Notes or the Scrolling Text Interactions.

Text Entry Boxes can be used in two ways:. 

Not Validated

This is the default setup, learner can enter whatever he wants,  any entry is considered to be correct. 

However you can restrain the characters that may be used by clicking the More Options button, and you can set the required number of characters as well. If you activate the option 'Auto Submit' it will be submitted when the lenght of the entry has been reached. You don't need the Submit button in that case, can drag it out to the scratch area. If you don't activate anything in More Options, all characters (numeric as well) will be accepted but that option will (strangely) not be checked.

Let us look at the Actions tab. As with quiz and Knowledge check slides, you have a Success action and - in case of limited attempts - a Last Attempt action. That is a bit confusing, because any answer is considered to be correct for a non-validated Text Entry Box.  and the cause for a question that pops up sometimes in the forums. There is only a Success event, which means the Success action will be done all the time. Look at an example from a recent question:

"I offer 3 attempts to fill in a TEB, but it is only possible to enter once, the playhead moves on after the first submission'. 

Default Success action is set to Continue for a TEB.  This action will be executed after the first attempt, playhead moves on indeed. To avoid that, you could change the Success action to 'No action'. Result: user will have to fill in the field three times, after the third submission the Last Attempt action will be done. Maybe not what you want?  An easy solution is to add a custom button 'Next' to move to the next slide for users who do not want to fill in the field 3 times.

There is no built-in functionality to check if anything has been typed in the field when the Submit button is clicked. You can use the workflow described in this post if you don't want to end up with an empty variable.

Option 'Reporting' will be dimmed for a non-validated TEB, which is logical. 

Sometimes ignored, but worth mentioning: if you expect to have a long text to be entered, please check the option 'Show Scrollbar'. You can see it activated in the most recent screenshot.

The shortcut key is Enter, which is pretty common to confirm an entry in a form field. You can change it to TAB if you have mulltiple TEB's on the slide. 



Validated

A Text Entry Box is validated when you check that option.  WIth the selected TEB a HUD will appear to enter the possible correct answers using the + button.  It is recommended to put the By default the option 'Case sensitive' is not checked, but I did so in this screenshot:

Tip: you can resize the TEB, it is not necessary to put the longest entry on top as is the case for FIB quest

Because you have defined correct answers, the TEB has now two events: the Success event, and the Failure event if you have a limited number of attempts. Success action is only happening if a correct answer is given, the Last Attempt action after the last attempt if that was still a failure. Be sure to turn on the Success and Failure captions. There is no Retry message as you can have for quiz slides, nor multiple Failure messages. I have a workaround for that, but that is outside of the scope of this basic post.

A validated TEB can be scored, the score can be added to the Quiz total (will appear in the Advanced Interaction panel) and be reported. As I mentioned before, when creating a Software Simulation in Training or Assessment mode, you will see that reporting is turned on automatically.

Typical use case for validated TEB's: use multiple TEB's to create a custom Fill-in-the-Blank question, if you want to have each blank field to be scored individually. That is not possible with the default FIB quiz slide.


Associated Variable

A Text Entry Box needs a, associated variable to be functional. That is the reason why a generic variable is created automatically. It has the same name as the Text Entry Box, which is a bit confusing because the general 'law' in Captivate is never to reuse a name for a second item. However there is a very easy workflow to create and associate immediately a user variable with a more significant name. No need at all to open the Variables dialog box and create that user variable (as you can see in other tutorials). Follow these steps, after having inserted the Text Entry Box (validated or not):

  1. Click the X button next to the Variable field which currently contains the generic variable (in the screenshot it is "Text_Entry_Box_3"
  2. Type a name for the user variable. It will be created and associated with the TEB. In the screenshot: "v_name"

You can verify (not necessary) in the Variables dialog box. The original variable with the generic name is still there, but as you can see in the following image, no longer in use. If you are in spring cleaning mode you can safely delete it.

Displaying Variable

This is not specific for a TEB variable, but for all variables. More details in this post.

Do not type in the variable in a text container with the surrounding $$ but use the X button in the Properties panel (consistent, also X button). Not only do you avoid typos that way (variables are case sensitive) but you can check the number of characters that will be displayed. Default length is 50, but that may be too low, in which case you have to edit this length.

Text wrapping

Often overlooked by developers: it is possible to have text wrapping in a TEB. You just have to activate the option 'Show Scrollbar' which is disabled by default:


Where is Null in CP2017?

Intro

One of my most visited blog posts published 7 years ago (Captivate 5, 5.5)  is Where is Null?

Beware: the embedded movie is a SWF, you need a browser with enabled Flash Player to watch that movie. Everything worked fine for SWF output also in later versions. However it is now partially broken for HTML output in CP9 and CP2017. Several users contacted me to ask for a solution, hence the reason for this new post.

Use Case

The use case can be split up in two phases:

  1. Checking the entry in the Text Entry Boxes): user has to enter something, but it is not to be validated, cannot be empty. Because the way Captivate is treating the value of variables, you need to create an empty variable, which I use to label 'v_null'. If the TEB field(s) is (are) empty, a warning should appear for the user.
    That part described in the old blog post is still valid!  For that reason I will restrict the explanation in this post to one TEB on the slide.
  2. Reactivating the Text Entry Boxes) to allow a new attempt for the learner. Once the Submit button is clicked the TEB is deactivated by default. It is this second part that is no longer functional in recent versions for HTML output.  Focus will be on this second part.

Example Movie

You can watch the example movie by clicking this link

CheckTEB

Workarounds for Reactivating TEB

I propose two workarounds: the first workaround uses the dummy slide as described for another use case in a recent post as Tip 2 (Reset Slide). Since you will re-enter the slide, you can use the On Enter event to restore the initial settings. The second workaround uses micronavigation, which was also used in the original setup. But in this case micronavigation will be not be used to move the playhead before the pausing point of the TEB, but to re-enter the slide.

Solution 1: Using Dummy slide

In the movie this solution is on slide 3, the dummy slide (duration 0,1sec) is slide 2. You see the slide numbers at the bottom in the movie. That is the biggest drawback of this solution, you will have extra slide(s). Three events are used on slide 3:

  • On Enter event triggers the advanced action EnterEmpty which resets the situation when re-entering the slide: clears the TEB associated variable v_MyName, hides a Group Gr_Retry (message + button) which will be shown when the TEB is empty and hides another group Gr_OK (message + Next button) which will be made visible when the TEB has an entry.

  • Success event of the TEB triggers the shared action Check_TEB which is also used in the second workflow. It has 3 parameters: the variable associated with the TEB, what (group or object) has to be shown when the TEB is empty, and what (group or object) has to be shown when the TEB variable has a value. In this case the two last parameters are groups: Gr_Retry and Gr_OK.
  • Success event of the Retry button has the simple action 'Go to Previous Slide'.

Solution 2: Using micronavigation

You see this solution on slide 4. This solution needs one more user variable v_start to store the first frame number of the slide, using the On Enter event of the slide. The Retry button will use this number in combination with the system variable cpCmndGotoFrameAndResume to navigate the playhead to one of the last frames in the previous slide. This will avoid the creation of extra slides as with the first solution But the workflow is a little bit more complicated.  The used events and actions are now:

  • On Enter event triggers the advanced action EnterEmptyBis which resets the situation when re-entering the slide: clears the TEB associated variable v_myName, hides a Group Gr_RetryBis (message + button) which will be shown when the TEB is empty and hides a message  Tx_Welcome_20 (kept the generic name) which will be made visible when the TEB has an entry. It also defines the value of v_start with the current frame number, which will be the first frame of the slide. 

  • Success event of the TEB triggers the shared action Check_TEB  used in the first workflow. It has 3 parameters: the variable associated with the TEB, what (group or object) has to be shown when the TEB is empty, and what (group or object) has to be shown when the TEB variable has a value. In this case third parameter is not a group but the message Tx_Welcome_20.

  • Success event of the Retry button triggers an advanced action RetryAct with two commands: clears the variable v_myName, and calculates the frame number that is 2 frames less than the start frame of the slide. I prefer 2 instead of 1 frame because there could be a small delay which makes v_start equal to the second frame number of the slide.

Roundup

Drawback of both proposed workarounds, compared with the original solution (broken now) is possible flickering when the slide is re-entered. I have tried a lot of ideas to avoid that flickering which is an annoying issue since many versions (if my memory is correct since version 6): transitions (not slide transition which is unsupported for HTML output), Delay command, delay on timeline etc.. 

Drawback of the first workaround is that the total number of slides (cpInfoSlideCount) and the current slide number (cpInfoCurrentSlide) cannot be used directly to indicate slide progress due to the inserted dummy slides.

For the second workaround: if you want to apply this to multiple slides, it is possible to reuse the variable v_start which stores the first frame of each slide. If you use the shared action, the variable v_null is not defined as parameter. That means it will be automatically created when import or drag this action to the Library of a new project. As you probably know I am a big fan of shared actions. Maybe I will post some of my tricks to save time with shared actions. in a future post.