Tip 4: Decisions (Advanced/Shared Actions)

Intro: Decision (tab)

The Advanced Actions dialog box in its default setup for a new action, shows  3 decisions with the generic names 'Untitled-1', 'Untitled-2' and 'Untitled-3'.It is possible to replace the generic names of course. In this screenshot they are marked by a red rounded rectangle. 

On top of the decisions to the left you see three buttons, which allow to Add decisions, Remove or Duplicate a decision.  There is no real limit to the number of decisions within one advanced/shared action. 

In the center above the decision names you find two buttons (blue rounded rectangle in screenshot above) which allow to change the sequence of the decisions by moving them to the right or to the left. That sequence is very important! First rule to remember when starting with Advanced/shared actions:

"All commands (actions) within an Advanced or Shared actions are always executed when the action is triggered. They are done always in the same sequence: top to bottom within a decision, left to right in the decision sequence."

Workflows which exist in most programming language to skip part of a long script do not exist. Forgetting about this first rule often leads to logical bugs!

Each decision can be converted into a conditional one by checking the option 'Conditional tab'. The word 'tab' is used there, but I largely prefer the original name 'decision' because Captivate has tabs in many locations, not only in the Advanced Actions dialog box. For a conditional decision, you have the choice between the classical 'IF-THEN-ELSE' which has two sets of commands (THEN, ELSE). One set be will chosen based on the result of the condition.
The WHILE condition leads to an infinite or finite loop. The set of commands will be executed after 1 second, based on the condition:
I would like to offer some tips now both to avoid problems and to streamline the choice of decisions taking into account the limitations mentioned before.

Tip 1: Combining standard and conditional decisions

This tip is based on my experiences with consultancy jobs and answering on the forums.

When starting to create advanced actions it often happens that too much commands are pushed into one conditional decision. I recommend to reflect: which of the commands (actions) have to be done independently of the condition? Those commands will appear in both  THEN and ELSE sections. In that case, take them out and put them in a separate non-conditional decision. 

Same recommendation when using multiple conditional decisions, if some commands appear in all of those conditions.

Example

This scenario appeared several times for debugging on the forums: 'Looping through a number of images  with their text, and showing a Next button after the first loop'.  The loop in this example is done with show/hide, not with a multistate object (which is easier however). Look at the original advanced action, meant for 3 images:

The second/third image and text are hidden in Output. The first image and text are visible. The result of this action is that the loop will not work, that each click on the button will always show the third image, while the counter will indeed loop and the Next button will appear as wanted. Reason is that the last conditional decision overrides the other decisions. Compare this with this solution:

In this action:

  • Texts and Images were grouped, to allow taking out the Hide actions from the conditional decisions.
  • A non-conditional decision was added before the conditional ones to hide the groups before the showing the text/image corresponding with a specific variable value. Moreover the (absolute) Assign command was replaced by Increment.
  • The conditional decisions show text, image. The last one needs also to show the Next button and reset the counter to its original value, which is 0. In that case you need Assign of course.


Tip 2: Multiple conditional decisions - make them mutually exclusive

When you have multiple conditions decisions in sequence (remember the sequence rule), avoid using the ELSE parts. You'll have less possible problems when using only the THEN part and write a conditional decision for each possible situation. If you use the THEN parts, there is a big chance that a later decision will overrule what has been done in the previous ones.

Eventually it is possible to use an ELSE part, but only for the last decision. You need to double-check if that THEN part will not mess up with previous decisions.

Example:

Using the same situation as for the first tip, there is no way to use the ELSE part of the decision 'Second' to replace the decision 'Third'.  The complete action would then look like this:

The result would be that the First decision would never be done, the second image/text never pops up and the Next button will appear after having viewed only the first and third image.


Tip 3: working with Tracking Variables

The first tip already showed how dangerous it is to change the value of a tracking variable within a conditional decision, if you have more than one of those decisions. In most cases it is safer to keep the value change in a non-conditional decision. You are probably aware of the three ways to attribute or change the value of a variable:

  • Assign: which I label as the 'absolute' way, and is valid for both strings and numerical values.
  • Increment/Decrement: often used when you also need a counter.
  • Toggle: typical for a Boolean variable, which is used for an On/Off situation. 

Here are two situations where you will need to have the variable value change within both parts of a conditional action (THEN and ELSE):

3.1 Toggle button action

Such an action will often have only one conditional decision and uses a Boolean variable for tracking. Have a look at this script, which will show/hide an object:

3.2 Non-eternal loop (WHILE)

Such a loop needs to have a way to stop looping. That is done with a tracking variable which needs to be changed within the actions which need repetition. Here is an example from a dice game. The dice number (random) is stored in a variable, and another variable stores the number of stairs which need to be climbed. The screenshots shows only the While decision of the action.




Tip 3: Show/Hide or Multistate object? (Advanced/Shared actions)

Intro

When talking about Advanced/Shared actions most developers think immediately about rather complicated scripts, with conditional branching. However the first reason to start using those actions replacing simple actions (from the dropdown list under the Actions tab) is that the commands have less restrictions when used in advanced/shared actions. Typical examples:
  • Show/Hide commands: when using those in a simple action you can only address objects residing on the same slide as the action. It doesn't matter which event you use as trigger: Success event of a button, On Enter event of the slide. That is not the case when using those commands IN an advanced/shared action.
  • State commands: are also restricted in a similar way. You can only point to multistate objects on the same slide. Another limitation which disappears when used IN advanced/shared actions.
  • Jump to slide command: when used as simple action it is impossible to point to the same slide as where the action is triggered. That is a show stopper when trying to Replay a slide. See the blog Replay/Reset Slide.

This blog will focus on the two first command groups. Although they are both used often for Click/Reveal actions, it is in a branching scenario, with a dashboard branching to chapters that the extended commands are especially useful.

Due to being able to access objects on other slides than the active slide, the dropdown lists can become very long. That is the reason why my first two tips were about Filtering and Labeling of course. 

In most courses the learner will be allowed to revisit slides. To allow that it is important to include that situation when setting up actions. 

Dashboard Setup

Situations

  1. The dashboard or menu slide has interactive objects - mostly buttons - branching to the different chapters in the course. 
  2. On the last slide of each chapter another interactive object will navigate back to the dashboard slide.
  3. The progress is made clear to the learner by adding an indicator to the dashboard slide for completed chapter. That indicator can be a checkmark, a different look to the chapter button, a progress bar... 
  4. Tracking full completion of the course is often required. After having taken all the chapters something will occur: a new button appears, navigation to a congratulations or recommendations slide,...

Show/Hide workflow

Add the checkmarks (or other objects) to the Dashboard slide, and hide them in output (eye button on Properties panel). Label them with a referenced to the chapter they belong to. I will use Check1, Check2, Check3....

Use these events and actions:

  • Buttons on the Dashboard slide (Success event) need a simple action 'Jump to....' pointing to the first slide of each chapter. Do NOT create a Visited state for those buttons, because such a state will appear immediately after the button has been clicked, not after finishing a chapter. This refers to situation 1.
  • Return button on the last slide of each chapter t(Success event). That will need an advanced or shared action with these commands:
       Assign v_1 with 1                                a Boolean user variable will be set to 1 to track completion of chapter (situation 4)
       
    Show Check1                                      to make the previously hidden checkmark visible (situation 3)
       
    Jump to Dashboard                             situation 2
    A similar action is needed for each return button. If you choose a shared action, the tracking variable (v_1), checkmark (Check1) and Dashboard slide will be the parameters.
  • On Enter event of the Dashboard slide will need a conditional action to complete situation 4:
       IF v_1 is equal to 1 AND
           v_2 is equal to 1 AND
           v_3 is equal to 1 ....
        DO.....                                               whatever you want to happen when all chapters are done at least once.
    This example is for a dashboard with 3 buttons/chapters. You can of course extend this for any amount of chapters.

This is the easiest setup, better than having a much more complicated script On Enter for the dashboard slide, which will check all chapters. I often see that still appearing during consultancy jobs.

If you want to allow resetting the dashboard slide (taking out checkmarks and toggling the tracking variables back to 0) during one  session, start by grouping the checkmarks in Gr_Checks. Use this action for the Reset button:
                 Hide Gr_Checks
                 Assign v_1 with 0
                 Assign v_2 with 0  
                 Assign v_3 with 0
                 Hide.....                      whatever you had popping up after course completion

Multistate object workflow

Add a custom state to each button on the dashboard slide, which includes the checkmark and eventually has a different style forr the button. Make sure to check the option 'Retain state on slide revisit'.

The same events are used as in the Show/Hide workflow. Even the same actions, except for the Return button on the last slide of each chapter:

  • Buttons on the Dashboard slide (Success event) same as in Show/Hide (situation 1).
  • Return button on the last slide of each chapter t(Success event). That will need an advanced or shared action with these commands:
       Assign v_1 with 1                                a Boolean user variable will be set to 1 to track completion of chapter (situation 4)
     
    Change state of Button1 to Done       to show the custom state (situation 3)
       
    Jump to Dashboard                            situation 2
    A similar action is needed for each return button. If you choose a shared action, the tracking variable (v_1), state (Done)/button (Button1) and Dashboard slide will be the parameters.
  • On Enter event of the Dashboard slide: same as for Show/Hide (situation 4)

If you need to reset the dashboard slide within the same session, the Reset button action will be bit longer:
                 Change state of Button1 to Normal
                 Change state of Button2 to Normal
                 Change state of Button3 to Normal
                 Assign v_1 with 0
                 Assign v_2 with 0 
                 Assign v_3 with 0
                 Hide.....                      whatever you had popping up after course completion


Next?

The choice of decisions, and its sequence are very important when creating advanced/shared actions. It will be the topic of the next tip.

Simple Stopwatch with While Loop

Why?

Since a while I planned to:

  • explain the use of the Timer (or similar Hourglass) learning interaction
  • create a new example of using the While condition in an advanced or shared action

For some reason every blog I write about Timing (not timeline) seems to attract lot of viewers.  I have been using the Timer interaction several times, in combination with Time system variables. It is one of the rare interactions that allows you to have an action based on the expiration of a set time (jump to another slide) without having to play with variables and JS or advanced actions.

However that Timer interaction has several drawbacks:

  • You cannot pause.
  • You cannot control the start. It starts running whenever its timeline starts, even if it is hidden in output.
  • You cannot restart after a pause, since you cannot pause.
  • You cannot reset it.

Personally I am also bit frustrated by the While loop, because of the time lag between two executions of the command sequence in the loop. I could see a lot more possibilities if I could control that time lag. ‘Delay next actions’ is not always possible. However I suspected an unexplored possibility which I used in this example. Compare the time showed in the Timer interaction and the digital Stopwatch.

Have a look at the example file, it shows two very simple Stopwatches: a digital and an analog version. You are able to start them, to pause, restart after a pause and reset.  They are very simple, show only seconds.  Reason: for this first version I didn’t want to use JS, everything is done with advanced (or shared) actions.

The workflow step-by-step will be explained in a blog post. You’ll learn how to ‘break’ an eternal loop created with a While condition.

Example project

It is not a full course, only to show the created Stopwatches. There are multiple possibilities to include such a stopwatch in a course: to allows the learner to check time spend on slides, questions. Since the time is stored in a user variable it is also possible to use that to calculate total time…  I would appreciate your ideas. You can watch the project from this link (rescalable) or the embedded version:



While loop

Although this feature appeared with the refurbished Advanced Actions dialog post in CP2017, I rarely see projects using the While loop except for some games.  Such a loop can be eternal or limited to a a specific number or repeating commands. It is always based on a condition, but the result is different from the older ‘IF’ condition.
  1. Eternal loop:  uses the condition ‘IF 1 is equal to 1‘ or something similar, which results always in a positive result. The specified commands will repeat continuously. However! Contrary to the default behavior in advanced actions, where all commands run immediately and in sequence (top-down and left to right through the decisions), the commands in a While loop will be delayed for 1 second before the next run. It is this feature which I have used for the stopwatches.
  2. Limited loop: will need at least one variable. The condition ‘IF var is less than 6′ is an example. The variable ‘var’ needs to start with a number which you define in the variable definition or by another action. The variable will also need to be changed inside the commands. In this case it will probably be done with ‘Increment’. If var starts at 0, the commands will be run 6 times. In this case as well there is a delay of 1 second after each run.

Breaking a loop?

To break an eternal (or limited) loop, you need a combination of two conditions with the AND operator. The second condition will probably refer to a variable. I used a Boolean variable as you’ll see below. That variable needs to be changed by another action. Example:

IF 1 is equal to 1 AND
     v_stop is equal to 0

As long as the variable v_stop has the valueo 0, the loop will continue. But if the variable is toggled to 1, the loop will be broken.

Workflow Step-by-Step

Variables

No system variables were used, just 3 user variables:
  • v_time: stores the number of elapsed seconds. It starts with a value of 0, also after Reset.
  • v_stop (Boolean) has a default value of 0 and is used in the combined condition of the While loop. It will be toggled to 1 when the Pause button is pressed.
  • v_start: stores the frame number of the first frame of the slide. It is necessary for the Reset functionality, where I used the workflow described in this recent post ‘Replay or Reset‘.

Events and Actions

EnterAct triggered by the On Enter event

Both v_time and v_stop are reset to their default values (0). The frame number in v_start is needed for the Reset action.

Start actions triggered by the Success event of the Start buttons

These actions are slightly different for both stopwatches. This is the digital version:

The button used in this version has a custom state to replace the Normal state when the Pause button is used. It has the text Restart. The variable v_stop needs to be reset to 0, because it could have been toggled to 1 when the Pause button was used.

The combined condition for the While loop has been explained before.

The version for the Analog stopwatch:

Needle is a shape with a transparent part to be able to apply a rotation effect. The technique has been described in this blog ‘Reference point in Captivate‘.

The rotation effect was defined as a custom effect. If you want more information, have a look at:

How to use a Custom effect in an (advanced) action

ResetAct, triggered by the Reset buttons

As explained in the Replay/Reset blog, this action needs only one command:

In this use case the Continue command is superfluous, since Captivate is waiting from the first frame for a click on a button.


Embed Software Simulations (Knockout slide)

Intro

Over 10 years ago I posted a blog 'Create/Use a Knockout Master slide'. At that moment SWF was the only way to publish a Captivate project, and in versions 5 and 5.5 Themes were not ‘grown up’ yet to their present power. Meanwhile I have pointed many users to that old article, and many claimed it was still useful. However time to clarify the slight differences and offer updated tips., Of course I will use a HTML example. 

Example Tutorial: 'Shared actions as Template'

This is a Captivate tutorial explaining how you can use a Shared action to create variables and as template for advanced actions. There are two versions. Here is a screenshot showing the difference in sim slides between version 1 (Full-size) and 2 (Embedded)

Version 1: Default software simulation

Personally I never use a software simulation in Demo mode, because it is better replaced by a Video Demo for its quality and advanced editor. I created a Training simulation, meant to learn about this Captivate topic. The UI of Captivate is rather complicated, hence my choice of a resolution 1600x900px. The ratio is important, here the common 16:9. In the limited space here, I don't want to embed the simulation because that would be almost useless. I published it as a HTML rescalable project. You can watch it using this link:

Full-size tutorial

In this first version, instructions are given using Audio. The captured Backgrounds (see Library) are filling the slides. Although this tutorial is rescalable, you will realize that using this on the limited space of a smartphone with a phone browser is not appropriate. It may be used on tablets (no incompaté:ible features), but the preferred devices are laptop/desktop. 

Version 2: Embedded in a content slide

I used the workflow explained below to create a second version, where the software sim slides are rescaled and embedded in content slides (1280x720px). On those slides there is space for a logo and more. The narration was replaced by text instrutions on the same slide as the software sim. Published project is also rescalable HTML. Even a tablet will probably be impractial in this version. Use this link:

Embedded tutorial


Setup for Embedded sim slides

For this example the simulation slides need to be embedded in a project  with a resolution of 1280×720 pixels. The captured slides were created with a resolution of 1600x900pixels, which is larger than the final resolution.  

To embed the sim slides, they need to be rescaled. If the original simulation slides have the correct resolution ready for embedding, you can skip Step 0.

Step 0 in Captivate (only if captured resolution is not correct)

Rescaling the software simulation to 2/3, which leads to a resolution of 1066x600px. You choose the resolution needed for your project, but keep 'Maintain Aspect Ratio' and 'Rescale all objects'.  Those are the default settings.

Step 1 (in Photoshop or other app) – create the Knockout image

In Photoshop I created images on two layers: the first one (FullTexture' will be used for normal content slides, the second one is the 'Knockout' image which has a transparent part.  Size of the file is same as the end resolution (1280×720). I used one of the provided textures in Photoshop as Fill. In the second layer I deleted a rectangle of 1066x600px to create a ‘knockout’ part in which the sim slides would fit. You see the size of the margins (with texture) in the screenshot: to the left – a vertical bar with a width of 200pixels, to the right one with a width of 14px; at the top another with a height of 90 pixels and a the bottom a bar with a height of 30 pixels. 

You can import the Photoshop file, and will have both layers as PNG images. See 'Roundtripping with Photoshop'.
You can use another graphics application if you cannot use Photoshop. You could also create a freeform filled shape in Captivate, start with the hexagon, which has 6 points.

Step 2 (in Captivate) 

Some maths to start with:
  1. calculate the difference between the widths of the vertical bars:     200 – 14 = 186 pixels
  2. new width project will be 1066 + 186 = 1252 pixels
  3. calculate the difference between the heights of the horizontal bars:   90 – 30 = 60 pixels
  4. new height project will be 600+ 60 = 660 pixels
Rescale the project using these settings:
  • deselect ‘Maintain aspect ratio’ and introduce the new dimensions
  • under ‘New Size is Larger’, select ‘Keep project the same size and position project Bottom Right; I choose this because the bottom bar and the right bar have the smallest dimension; you can choose another option if your smallest margins are elsewhere.

The result will look like this:


Step 3 (in Captivate)

 Rescale now to the final size, for this example to 1280x720 pixels, with settings:
  •  deselect ‘Maintain aspect ratio’ and introduce the final dimensions
  • under ‘New Size is Larger’, select ‘Keep project the same size and position project Center

After this rescale of the project it will look like this:

Step 4 (in Captivate): Master slides

 In the original blog post it was possible to create a master slide which is partially transparent, but that is no longer possible in the present versions with the Themes (new since Captivate 6).  Here is the master slide panel, where you see some master slides of the custom Theme 'Knockout' which I created:

I used the two imported PNGs from the Photoshop file to create:

  1. The Main master slide, where the FullTexture image is set as background image. You see the setup in the Properties panel:
  2. Based on that Main master slide, I created some content master slides. You see acouple of them in the master slide panel above (Title, Light). The Blank master slide always has to remain Blank, it is not using the Main master slide.
  3. The Knockout master slide. You cannot use the KnockoutTexture image as was done in the Main master slide, it needs to be a separate image as you can see in the Timeline and in the Properties panel. I added some objects and placeholders:

Step 5: Apply Knockout to simulation slides

Up till now the simulation slides used the Blank master slide. Change the master slide to the Knockout Master slide. It is very important that you do NOT check the option 'Master slide objects on top', because you'll lose the textured parts of the image.





Retake (quiz) Tweaks

Intro

In the recent weeks a lot of questions about tweaking Quizzes appeared. 

Themes, Timelines and Shared actions are amongst my favourite topics, and I needed a long sample project, for this blog about combining two tweaks for Retake Quiz:

  1. The quiz slides are not all in sequence, but distributed in the project in between content slides. How can the learner see only the quiz slides during Retake, not the content slides which are in between the quiz slides?
  2. On the score slide on failure, how to offer the learner the choice between Retaking only the quiz, or retake the full course including all content slides?

Sample Project

This project has 3 sequences of quiz slides in between content slides. Question slides have one attempt, on Quiz level you have 6 attempts. On the score slide you have the possibility to Retake quiz, or to choose to retake the course. When passed or after the last attempt on quiz level, you have the Review functionality, using the customized Review message described in an other article Customized Review Message.

In this example project design elements (not interactions) from the Quick Start Project “Wellbeing” have been used. You can watch the embedded version below or use this link to watch a scalable one.


The project was created with:
  • 5 advanced actions
  • 6 shared actions, replacing 45 duplicate advanced actions

In this post I will only explain the actions for the two Retake Tweaks, not the actions for the multiple Forced view cocntent slides.

Workflow

Situations and events

In this course 3 different situations occur for the quiz:
  1. First view: the tutorial will be followed as designed. It is not a linear course, because the slide with the 3 topics is a sort of dashboard, from which branching occurs. Each branch ends with a question slide. The return to the dashboard slide is configured using the Success and Last Attempt action of that last quiz slide.
  2. Not first view with Retake Course: is a Retake but including all content and quiz slides. All quiz slides, and the dashboard (Topics) slide need to be reset to their initial state. Difference with 1: the number of attempts on quiz level.
  3. Not first view with Retake Quiz (only): this is the default Retake situation, but needs actions to skip the content slides situations in between quiz slides.

This screenshot of the Advanced Interaction panel shows the relevant interactions and events needed to cope with those 3 situations; the relevant actions are marked with a colored highlight box:

There is one special Advanced action, invisible in this panel: On Enter event for the first question slide has an advanced action FirstQuestion. On Enter actions for question slides do not show up in this panel, because the Success column is linked with the Success action of the question slide.

Variables

There are several reusable variables (v_1, v_2…. and v_counter) needed for the multiple Forced View content slides, and the system variable (cpInReviewMode) for the custom Review message. For the Retake tweak workflow these variables are used:

  • v_course: has a default value of 0. That value is valid for situations 1 and 2, where content slides need not to be skipped. The variable will be toggled to 1 for situation 3, where content slides need to be skipped.
  • cpQuizInoPassFail and cpQuizInfoAttempts: both quizzing system variables
  • v_themev_timelinev_shared  are used to track the completion of the three topics, on the Topcis slide (3). I mention them because they will appear in the advanced action EnterTopics.

Actions

EnterTopics (Advanced action) triggered On Enter for slide ‘Topics’

This action checks the values of the variables associated with completion of the three chapters. Only when all have been visited, the learner will be navigated to the score slide. That score slide shows the results of the complete quiz.

There was no possibility to use the variables (v_1, ….v_6) on this slide. Since the action is only used once, it made no sense to use a shared action neither. For situation 2, this Topics slide needs to be reset. Reset is happening with the RetakeAct action (see further).

FirstQuestion (Advanced Action) triggered by On Enter  First question slide

Only the second decision (RetakeCourse) is relevan for the Retake tweak, first decision is for the custom Review message. That second decision is required for Situation 2. Since the Retake button is used in that situation, by default the learner will be sent to this slide, the first question slide. But in Situation 2 the learner wants to see the full course. For that reason learner is redirected from the first question slide to the Topics slide.

EndQuestion (Shared action) for Success and Last Attempt of last question in each sequence

Each decision corresponds with a situation (same sequence as situations).

This action skips the content slides in Situation 3 – ‘Decision SecondNormal’. In that situation the last question will be followed by the first question in the next sequence of questions. The two other decisions - situation 1 and 2 - navigate to the Topics slide.

There is one exception: the last question slide of the last sequence needs to navigate to the score slide. I could have used the same shared action and give the second parameter the value of the score slide. However due to my experience with low bandwidth situations, it is better to use Continue for the Success/Last Attempt actions on question slides. For that reason, I used the shared action as template to create one Advanced Action:

EnterScore (Advanced Action) On Enter for score slide

As explained under Variables, the user variable v_course is tracking whether a normal Retake will be done, or a full course Retake. Of course the button to Retake full course is not needed when the quiz is passed. If the learner failed, the value of v_course is toggled to 1. That stands for a normal Retake (no content slides). The start value was 0, which meant that all slides were viewed the first time. That value will be reset to 0 by the RestartAct.

RestartAct (Advanced Action) for Success Event custom button (Bt_Restart)

If the learner fails, Bt_Restart will appear on the score slide. It is a shape button, having the same look (style) as the Quiz buttons. It will trigger this action:

It is a standard action, inviting the learner to click the Restart button.  At the same time it will reset the variables for the course situation (v_course) and for the items on the Topics slide, both variables and states. That slide was the only ‘forced’ slide where the ‘Retain State on Slide Revisit’ was checked, hence the need to reset the states.

The state change for the button is to pop up the explanation text, inviting to click the Retake button. As usual I did drag the Review button under the Retake button. Review button will only appear after the Quiz is Passed or all attempts on Quiz level are exhausted.

Possible extensions

It would have been possible to restrict the Force View on the content slides to the first view. That workflow is described in these two posts presenting yet another Shared action:

Force First View

Advanced to Shared action

Of course Narration could have been added as well. And that same shared action could also improve the second view of a content slide by skipping that narration with the same micro-navigation.


Editing Ready-to-go slides (Quick Start Projects) - part 2: Interactions

Intro

Many users wanting to take advantage of the Ready-to-go slides available through the Assets panel in 11.5, are blocked when trying to customize those slides. In a previous article I offered a step-by-step workflow to find texts or images you want to replace by your text or images. That was not so hard, and you learned to use several panels (Timeline, Master Slide, Object States, Library).

For Interactions the situation is more complicated. You will not find a complete 'How-to' in this blog. Some interactions are rather easy to understand and customize, other interactions however need an in-depth knowledge of Advanced actions and variables. Those slides never use Shared actions, which would be easily found in the Project Library. This blog will try to help you identify the components (actions) of the interactions, how to 'read' them and tips for customizing. The workflow will be explained using a Knowledge Check slide from the project 'Alliance'. The interaction can be told to be of intermediate level. Understanding this workflow will allow you to customize easy and intermediate level interactions. For more complicated interactions this may not be sufficient. Maybe find help from someone experienced in Advanced actions.

Step 1: Find Interaction components

On the slide with the Interaction to identify, open the Advanced Interaction panel from the Project menu or with the shortcut key F9. The slide will be selected in that panel and with the default setup you will see all the actions in that slide, and the events to which they are attached. Here is an example:
The selected slide is slide 26, labeled Knowledge Check in the Quick Start Project 'Alliance'. You see in the table that the On Enter slide event has no action attached, the field 'On Success' on the slide line mentions 'No Action'. This means that the interaction is only created using Success events of interactive objects, which you can also find in this panel.

The level below slide level shows all interactive objects and their Success actions (when clicked) in the 'On Success' column. In this case 5 Smartshapes have been defined with the option 'Use as button' and they all trigger an Advanced action. From the labeling of the objects and the actions you can suspect that 4 of those advanced actions are similar (on shapes KC1 - KC4) and one is unique (on the unlabeled Smartshape). When you select one of the lines associated with an interactive object, the object will be selected on the slide. 

Step 2: "Read" actions (components of interaction)

Let us continue with the same slide from the Alliance project. Select the object KC_1. Its Properties panel shows up, switch to the Actions tab. Open the Advanced action 'KnowledgeCheck_Select1' by clicking the Browser icon. It shows a list with 5 lines, which I will label as 'commands':

The first command line 'Assign.... true': gives a value 'true' to a user variable 'sales_knowledgeCheck_correct'. The name of this variable indicates that it needs to be true for a correct answer, 'false' for a wrong answer. You can check this by reading one of the actions on the three other objects (KC_2...KC_4), where you will read that the given value is 'false'. 

The other command lines are used to change states for the objects, to indicate which object has been selected (active). You can find more explanations about multi-state objects in the first part which I mentioned in the intro.

Open now the unique action 'KnowledgeCheck', linked to the unnamed Smartshape_337. In the Timeline you can see that it is the Submit shape button.  In the Advanced Actions dialog box you see that this is 'conditional' (marked in red). In that case "reading' will be easier if you switch to the Preview window, which you do with the arrow button top right, which I marked with a green box:

In the Preview window you see that the state of two multistate objects will be changed depending on the value of the user variable sales_knowledgeCheck_correct. Identifying those multistate objects allow you to edit the states as explained in the first blog.

Step 3: Customizing examples/tips

In the example the first answer is deemed to be correct.  You can move the shape buttons KC1-KC4 around, to put the correct answer in another location. No problem, the interaction will continue to work as expected.

Less answers

You can safely delete one of the wrong answers in this particular use case. That may not be the case for all interactions. Here however the final action (Submit button) is in no way checking or taking into account the number of answers. You only need at least one correct and one wrong answers.

More answers

If you want an extra answer, you'll have to decrease the size of the answer shapes KC1-KC4. For the 5th answer you can duplicate one of the answers with the right-click menu or the shortcut key CTRL-D (Cmnd-D on Mac). Use the Align options (or toolbar) in the right-click menu to put everything in place. The name of the duplicate answer will probably start with KC_ as well, but not necessarily be 'KC_5'. You don't need to edit the name but I did so (Properties panel) just to clarify. That duplicate answer will have the same states as the source answer. You can check using the Object State panel.

It is however necessary:

  1. To edit the existing action for the four older answers, because the state change for the new answer needs to be added.
  2. To create and edit a duplicate advanced action for this new answer.

Editing actions KnowledgeCheck_Select1....

Open one of those actions using the Browser icon in the Actions tab (see Step 2 for a screenshot).

The first command line is fine. The Change State lines set the state for the selected answer to Active, the other answers get state Normal. For all those actions a sixth command is necessary to set the state of the new answer to Normal. Steps for KnowledgeCheck_Select1 are indicated in the screenshot below and you'll find the numbers in the explanation:

  1. Select the last command line
  2. Use the Copy button
  3. Move to the next empty command line
  4. Use the Paste button
  5. Double-click the empty third field and type KC: only the items having KC in their name will appear. Remember: I named the new answer 'KC_5'
  6. Choose 'KC_5'
  7. Click the down arrow in the next field.
  8. Choose the state 'Normal'.
  9. Click the button 'Update action' at the bottom and the action is complete now, including the 5th answer.
  10. To save time editing the three remaining actions, use the Copy button again on the last command line which sets the state to Normal for the last answer KC_5..

Switch to the action KnowledgeCheck_Select2 using the top right dropdown list:

Go immediately to the first empty command line and use Paste (step 4), and save the action (step 9)
Repeat step 10 and do the same for KnowledgeCheck_Select3 and KnowledgeCheck_Select4.
Do not close the Advanced Actions dialog box, you still need a fifth action.

Creation of KnowledgeCheck_Select5

The new action will be created as a duplicate of KnowledgeCheck_Select4. Select that action in the Advanced actions dialog box, follow the steps in the screenshot below

  1. Duplicate the action
  2. Edit the name to KnowledgeCheck_Select5
  3. Set the state of KC_4 to Normal instead of Active
  4. Set the state of KC_5 to Active instead of Normal
  5. Save the action and close the dialog box.

You still need to attach this new action to the answer KC_5 and you are ready for testing:

Tip: if you want to explore the Advanced Actions dialog box, you can read this blog.

More?

This is only one example of customizing a Ready-to-go slide. Some interactions are more complicated in those projects, some are easier. If you are in for a challenge, look for the Flipcard interactions, Glossary interaction or some Click/Reveal interactions. 

Do not hesitate to post questions, comments if you are stuck. If possible I will try to help.

Replay/Reset slide 2 (Captivate tutorial)

Intro

Recently I published a blog about what seems to be 'hot' topic: how to replay a slide, how to reset a slide. That blog didn't include an example file.

When coaching a training I often use Captivate tutorials, more than videos. This particular topic needs such an interactive approach, to allow to experiment, to get a 'feeling' of the difference between Replay and Reset (with or without an On Enter action). For learners I provide the cptx-file. Here I will only share the HTML5 published output. 

You will see that I borrowed design elements from the Quick Start Project 'Safety'. The interactions were created from scratch.

Content and Tools

After a short rehearsal of terminology and the step-by-step workflows you'll be able to see 4 different examples:

  • Slide 5  which is only based on the Timeline: staggered objects and effects. 
    The info button will show you the Timeline and a relevant part of the Advanced Interaction panel
    This slide is followed by a T/F quiz slide to check your observations.
  • Slide 7: click/reveal slide, using multistate objects. The info button shows you the same information as for slide 5
    This slide is followed by a MCQ slide with multiple correct answers, to check what you learned.
    Both quiz slides are Knowledge Check slides. If you want to cheat you can go back to the previous slide. Navigation by TOC is also possible. The TOC is in overlay mode.
  • Slide 9 : flipcard slide (with thanks to the QSP Alliance). Rather simple but worth seeing the difference between Replay and Reset.
  • Slide 10: Drag&Drop slide set up as Knowledge Check slide.

You may detect several techniques like Forced view, which need using some user variables. Quiz slides do not use the default two-step Submit process, but show a Continue button when the Submit button has been clicked. 


Tutorial

You can watch the embedded version, or use this link to play a scalable version. I recommend to use the link. The embedded version seems to have long loading times. 



Animations?

You may have missed animations in the tutorial. There is a reason. While it used to be possible to Reset an animation, that feature is broken in the version 11.5.1. At least for the animated GIF which I created. I have already been searching since a couple of weeks for a workaround without success. I will create an OAM as well, to check if has the same issues. Too bad, it was a fun animation:

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.


Game: using JavaScript in a Shared action

Intro

Last week I presented at the Adobe eLearning World 2020 “Deep dive into Captivate with Advanced and Shared actions’. I had prepared 3 different scenarios, to be ready for any audience. Due to the poll before the session I decided to go for the ‘newbie’ scenario because the majority was new to Shared actions, and a considerable amount of attendees even to Advanced actions. That means that intermediate and advanced users were perhaps disappointed. To remediate I plan some blogs and examples as illustration. This is the first one.

Javascript and Shared actions

It is possible to have the command ‘Execute Javascript’ embedded in a shared action. When talking about games, randomization is mostly used but not a ready-to-go feature in Captivate. In the session I showed a very simple board game where the tossing of a dice is simulated, and the board cursor advances based on the result of the dice toss. That was realized with one shared action.

This game uses random numbers as well. It is a memory game which can be used in many variations due to the flexibility of shared actions, variables and multistate objects.

Game

You will learn about the game rules in the game. There is an easy and a more complicated way to play the 3 games. Hope you don’t keep only the easy one if you are in for some memory training:

Play with the rescalable version using this link or with the embedded (fixed resolution) version:

Have fun!


Tips and Tricks: Advanced to Shared action (intermediate)

Intro

Recently i presented ‘Deep dive into Captivate with Shared and Advanced actions’ at the Adobe eLearning Word  202 conference.  During that presentation I used the ‘newbie’ scenario because the start poll pointed out that the majority of attendees were not really familiar with those actions. For the intermediate or advanced user, will try to post some blogs about tips which I would have included in my alternative scenario.  You may have seen the memory game which I published yesterday, and shows how you ca n include short JS scripts in the shared action.

The following tips are linked with my more than 19 years history of using Advanced actions, and 6 years with Shared actions. My viewpoints have changed quite a lot in that period. Presently my natural attitude is to reflect in most situations whether a Shared action is not appropriate. Why? One of the reasons is of course rIusability (with an external library), but even more important: it forces me to find better workflows. 

Throughout the presentation I used a demonstration project (include d here as well) FlipCard.   It started with an original slide from the Quick Start Project ‘Alliance’. I added two slides where the functionality of the original slide was extended  to have more functionality (toggle flipcard, forced view, reset of slide on re-enter). I used two different workflows for the Advanced action and the Shared action slides. Why? You’ll discover it below.

You can download the project file using this link.

FlipCard

Actions in the slides

Advanced interaction panel (F9) shows all actions on the 3 slides

Slide 1 (original from the QSP)

As you can see in the screenshot above, this slide has no action On Enter (normally meant to Reset), only   3 similar advanced actions for the flipcards. Those cards are shapes used as buttons, with two states: an image in the Normal state and the explanation in the Active state. Here is a screenshot of the advanced action for one flipcard:

The state Active is shown instead of the Normal state, a spin effect is applied and the shape button (flipcard) is disabled.  This means:

  • You cannot flip back to the image, because the shape button is disabled
  • Nothing happens when all flipcards have been flipped. Without a default playbar or adding a custom Next button, the learner will be blocked
  • When revisiting the slide:
    • the images will show up again, because the option ‘Retain state when slide is revisited’ is not activated
    • the shape buttons remain disabled, no clicking possible
    • which also means there is nothing to pause the slide, after moving throughout the duration (3seconds) of the slide the playhead continues to the next slide

 Slide 2 (extended Advanced actions)

To fix the issues of the first slide, the advanced actions used here look like this example:

This advanced action has two decisions. The changes in a nutshell:

  • The command ‘Go to state ‘Active” has been replaced by ‘Go to Next State’; this means that clicking act a s a toggle, since the shape buttons have only two states. It would also have been an advantage if this action was converted to a SA, one parameter less.
  • To track the clicks, a variable is needed for each of the flipcards, in this screenshot it is v_one. Its default value = 0, is toggled to 1 when the flipcard is clicked and that value remains 1. It is a so-called Boolean variable.
  • The second decision is conditional, checks the value of all the tracking variables and shows in this case a Next button.

When revisiting the slide, some issues are now automatically solved, but to have the slide behave completely like the first time, an action On Enter for the slide was used. 

That action will hide the Next button, and reset the tracking variables to their default value, 0.

Slide 3 (Shared Actions)

Many expected that I would convert the Advanced actions of the second slide to shared actions (at least for the flip act), but I used another workflow. If I use the Shared action ‘FlipAct’ as template for an advanced action for the first flipcard (as demonstrated in the session) it would have looked like this (Preview window):

That looks more complicated:

  • The command ‘Assign var with 1’ has been replaced by an Increment command
  • A new variable v_counter was added to keep track of the clicks. It is only incremented on the first click as you see in the second decision. For shared actions I don’t mind so much about needing more variables. Whe they are not defined as a parameters, they are created automatically when importing the action. Moreover this makes the last decision easier
  • since I need only to check the value of v_counter. Instead of comparing with a literal (which should have been 3 in the first project), another variable v_max was used which will be populated with the On Enter action. That will make the shared action more flexible. 

Result of this workflow is that only 3 parameters are needed for the shared action FlipAct:

For the Reset issue, I could have used an Advanced action, slightly different from the second slide. However I also converted it to a Shared action. Why?  When I drag that SA to another project, all variables (none are parameters here) will be created. For that same reason, I added some variables (here  7). This is a filled in action to be used On Enter, only the last two commands need a parameter. One of them is the number of flipcards (value fo v_max):

Not convinced?

For those who are not yet sure that the second workflow is better for shared actions, have converted the first Flip advanced action to a shared action. These would have been the needed parameters:

This is the situation if you have only 3 Flipcards. If you have 5 flipcards, you’ll will have 2 extra parameters: tracking variables.  The risk of missing to indicate the correct parameters when attaching the shared action to the shape buttons is much bigger than with the shared action I used in the third slide.