Tip 5: Parameters (Shared Actions)

Intro

First 4 tips in this series were valid for both Advanced and Shared actions. 

This blog is only for Shared actions, which are still not very popular amongst the Captivate developers. In my workshop at the Adobe eLearning World Conference I have demonstrated their power, even for unexpected uses. For each action I develop in my projects I always take a little time to reflect on this question 'Will this be useful as Shared action'? Result is that more than half of my actions end up to be Shared, not Advanced actions. My Libraries with useful shared actions are growing all the time, and have saved me already many hours of work.

In this article I will focus on tips for choosing Parameters to make the shared actions as flexible as possible. When saving an action as Shared action, you get a dialog box where compulsory and candidate parameters will appear:

  • Compulsory parameters: include all objects, audio clips, states... which you have in the advanced action dialog box, with the exception of literals and variables. You recognize them by the appearance of a yellow exclamation sign. When you add a description to such a line and indicate something as placeholder for the parameter the yellow sign is replaced by a green checkmark.
  • Candidate parameters: are the literals and variables which you find in a condition, or in commands like Increment. They get a green checkmark, but by using the checkbox you can convert them to parameters as well. 

Here is a screenshot of the dialog box for a toggle button. You'll see the compulsory and candidate parameters.  Description for the compulsory parameters has not yet been typed:

General Tips

Using several instances of one shared action to replace duplicate advanced actions leads normally to smoother projects, less risk of choking Captivate and even lower file size. However it is important to keep the number of parameters to assign on each instance not too high. Personally my goal is to have a maximum of 6-7 parameters. If you really need more of them, but appreciate the ease of transferring shared actions to new projects, remember that you can use each shared action as template for advanced actions. You can use that knowledge to create duplicate advanced actions if the number of parameters is too high. Labeling (see Tip 1) remains very important as well, because of the filtering (Tip 2) which is possible in the dropdown lists for parameters. You'll find some more tips below for the two types of parameters.

Compulsory parameters

Depending on the action using those parameters, they are either very specific (only one type) or they can be flexible and cover more than one type. Examples:

Show/Hide actions: they can aim at lot of object types. All graphics (bitmap or SVG), video, but also audio objects (invisible objects which have audio attached), learning interactions, but also Groups! These are probably the most flexible actions, and you may consider to replace a multistate object approach by Show/Hide for that reason.

Change State: not so flexible, they need always two parameters which are the multistate object and the state. Whenever possible try to use 

Go to Next State/Go to Previous State: you only need the multistate object as parameter

Assign can be used with 0, 1 or 2 parameters. You need 0 parameters if using two variables which are not defined as parameters, 1 if you have a literal which is no parameter or one variable defined as parameter, 2 if you have both literals/variables defined as parameters. 

Toggle: can only be used for Boolean variables, better choice than Assign because you have 0 or 1 parameter (the variable which could be defined as parameter).

Play Audio: needs an audio clip as parameter.

Apply Effect: only the object or group to which you want to apply the effect can be a parameter, not the effect itself. In most cases you'll want to use a custom effect to have the correct setup parameters.

Candidate parameters

Candidate parameters are variables and literals.  They appear in conditions, both for IF and WHILE setup, but also in the commands Assign, Increment, Decrement, Expression. 

Variables

If a variable in a shared action is not defined as a parameter, it will automatically be created when you import the shared action to a new project, including its Default value and description. One of the shared actions in my actions library is meant to avoid having to create much used variables in new projects. See this screenshot:

I also use that action as template for the many Reset actions needed On Enter for slides.

When you define a variable as parameter, this automatic creation will not happen!

Before defining a variable as parameter, you need to check if that variable is used multiple times in the action. Know that when assigning a variable to the parameter, it will replace that variable wherever it has been used in the action. I will try to explain by an example. If you ever created an advanced action for 'Forced View', where the appearance of a Next button is postponed until all clickable objects on the slide have been used at least once, this action for the first clickable object will look familiar:

In this project, the first clickable object is SV_Decision.  That object has a custom state showing Info, and acts as a toggle button. On a second click the Normal state will re-appear. Its tracking variable is v_1, a Boolean, which will get the value 1 on each click. On the slide 4 of those buttons need to be clicked.  For the three other buttons both the name of the button and the tracking variable need to be edited in a duplicate advanced action. The second decision checks the 4 tracking variables, shows the Next button if all have the value 1.

In this setup you cannot convert this action to a shared action. It would need 3 parameters:  the Next button, the button itself and the tracking variable. But if you replace the first variable by the second variable, that will also happen in the second decision, thus leading to a non-functional second decision where only 3 variables are checked. Have a look at this action:

In this action 2 extra variables are used:

  • v_counter: will be incremented only on the first click; that makes the third checking decision easier, and the tracking variable v_1 which appears twice can be replaced by any other tracking variable.
  • v_max: instead of the literal '4' this new variable makes the action more flexible. It can be used for any number of clickable objects on the slide. The value of v_max (4 in this case) can be assigned either directly in the Variables dialog box, or with the On enter action of the slide. You could also define that variable as parameter if you prefer.

Literals

Be very careful with literals as parameters. My replacing it by a variable in the previous example gives you a possible workaround. Especially if you have multiple literals in an action, defining them as parameters can lead to issues.  Look at this variant on the same situation described above:

It could be possible to define the value '4' in the last decision as a parameter, so that you can use the action for any number of clickable objects (alternative for the variable v_max). However, if you should define the '1' as parameter, changing it in an instance of a shared action would lead to changing it in 3 locations of the action! 

My recommendation: avoid defining literals as parameters!




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.




Let's Play and Dream

Intro

I want to try to keep the tradition to offer a special blog at the start of a new year. Like last year it is a game, hiding my greetings card. There is some nostalgia here as you will read.

On my personal blog you can still find the very first game I every created exclusively with Captivate: no Javascript, no use of widgets nor other applications. That was almost a decade ago. Since that  game used Captivate 5 , it took me quite a number of hours to get a satisfactory result. If you still have a browser with Flash Player plugin enabled, you can even watch the embedded game in this post:

http://blog.lilybiri.com/concentration-game-created-exclusively-with-c

With version 11.5, all interactive learning interactions were taken out (lack of use), including the games. You will recognize the former ‘Memory game’ in this game which I offer as an interactive Greetings card for 2021. Last year I also offered a game for the Chinese New Year.

Using version 11.5,  this version took me only about 20% of the time I spent in 2011 for the original version. This game uses only one shared action with 3 parameters, one advanced action for reset (and another one to restart the game). It is also much more flexible than the original game. Creating another game with more or less pairs will be a breeze due to the shared action. Finding or creating the images will take lot longer than adding the actions. It is possible to create 'pairs' that are not identical images: for language learning you can pair an image with a word (and maybe even audio), you could pair words in different languages, acronyms with their description etc...

Personally I would have used CpExtra to reduce the statement lines in the Advanced actions, because that wonderful widget allows to Assign, Show, Hide, Disable multiple objects in one statement. However, for the sake of consistency I have created the advanced actions  in the default way.

Have fun in 2021!

Game

As usual, I provide both a link to a rescalable version, and an embedded one with a fixed resolution.



Invite

I want to organize a webinar about this topic:

Remodeling Advanced actions to flexible Shared actions

This would be for developers with some experience about variables and  Advanced actions. If you are interested, please add a comment. From exploring Shared actions I learned to use a different mindset and could offer practical tips. You can even send me an advanced action you estimate to be appropriate to convert to a shared action.


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!


Find the Twins - Game (Shared Actions)

Inttro

Looking back in my blog history, I remember very well the first Memory Game created 10 years ago (with version 5.5). It was quite an adventure, because I wanted to prove it to be possible without having to use ActionScript  (since only SWF output was available).

Now 10 years later, ActionScript has been replaced by JavaScript but  I still try to create games without having to use JS.  That is possible when randomness is not necessary as is the case for this game. However newer features like multistate objects, SVGs which can be used as buttons, and most important 'Shared Actions' make it a lot easier now. Kudos to the Captivate team!

Have fun with the embedded version (fixed size), or the rescalable version using this link



Extensions possible?

The structure of this game allows a lot of flexibility. The two challenges have a different total number of shapes. Shapes can be replaced by images to convert it into a kid's game. It is also possible to increment the number of pairs, or to make a search for trios instead of pairs.

SVGs  used as buttons have several advantages. You can limit the clickable area to the image, instead of to the bounding box. They remain crisp ion all devices, whatever the browser resolution.  Disadvantage is that they take a while to redraw, which you may have seen when the slide was reset. 

As you could read I used:

  • 3 shared actions.  one of them was used 30 times!  If you are not yet convinced about the value of Shared actions over Advanced actions, I will present about both on 24th of June in the  Adobe eLearnng World 2020 conference.
  • 2 advanced actions for the Reset action On Enter for the challenge slides
  • 4 variables