Play/Pause Button extended (Classic Captivate)

Intro

This blog post is due to a forum question. For a custom Play/Pause button the developer tried the workflow from this post. However there was a second request: the learner was expected to click an interactive object to proceed to the next slide. The original conditional action for the Play/Pause button results in a conflict: if the learner clicks that button multiple times, the Play action can override the pausing point of the interactive object meant to pause the slide indefinitely until the learner clicks it to proceed to the next slide. If you want to learn more details, please check out this thread.

My promise: a workflow, taking into account that it should be possible to use it on multiple slides. You can test it out in the Example project. Maybe some of you could be in the same situation, hence this blog post. It is based on deep understanding of Captivate's Timeline, micro-navigation, power of shared actions and objects timed for the rest of the project. 

If you are wondering: this workflow is impossible in the new version 12 for multiple reasons.

Example project

Please test this project, either by watching it using this link for a scalable version, or the static resolution version embedded below. After the introductury slides you'll find two slides with the Play/Pause button. Test them by clicking that button multiple times and watch what happens when you reach the end of the slide: the button will change its state but the play head will remain paused until you click the

 Next button.   I used some design elements/slides from the non-

responsive Quick Start Project 'League'.


Background

The basic conditional action for the custom Play/Pause button, which is timed for the rest of the project to start with is:

I used the simple commands Pause and Continue, which have exactly the same result as assigning values to cpCmndPause/cpCmndResume. Toggling those variables alhough they are Booleans, is not possible (sorry). I preferred the 'Go to Next State' for the PlayPause button. This is the object state panel of the button, this command is toggling between the two states.

Due to the timing of the button for the rest of the project, it has always the same ID and the advanced conditional action has nothing which changes when being on another slide. Problem is that when the button is clicked to the Play state on the pausing point of the Next button, the Continue command will override the pausing by this button. To solve this we need to know 'where' that pausing point is, and add a new decision to the conditional action, where Pause occurs in that situation even when the learner clicks to play again.

If you have an instance of the Next button on each slide, to time it near the end of the slide, its pausing point will be at a different frame on each slide. In the example project, to simplify, I timed the Next button for the rest of the project and took out its Pausing behavior. But I added a click box on each slide, pausing at the end of the slide. The click box is invisible (no feedback messages) to the learner. 

I need to define on which frame the slide has to pause indefinitely. In order to keep the Play/Pause button action independently from that frame, I have to store it in a user variable. The value of that user variable will be defined using the On Enter slide event. 

Step-by-step workflow

Variables

System variables

The used system variables are:

  • cpCmndPause: has value 1 when slide is paused, value 0 when it is not paused.
  • cpInfoCurrentFrame: frame number of the present frame, index starts with 0; frame number is over the project not the slide.
  • cpInfoFPS: number of frames per second; default value is 30 but can be changed.

User variables

Two user variables will be used but since they both appear in a Shared action, they'll be defined when you send this shared action to a new project:

  • v_start: will store the frame number of the first frame of the slide
  • v_end: will store the frame number of the frame where you want to pause indefinitely; it will be near the end of the slide, but it doesn't need to be the last frame.

Events and actions

You'll see an overview of the actions on the two slides where the Play/Pause button is important in the Advanced Interaction panel::

PlayPauseAct (advanced action)

This action is triggered by the Success event of the Play/Pause button:
The second decision is simple: The play head will always be paused when the frame number is higher than the on in v_end. Due to the sequence of the decisions, the state change for the button will occur, but Continue will be overridden if the second condition is fulfilled.

EnterAct (shared action)

This Shared action is triggered by the On Enter event of each slide, has 3 parameters:
The first parameter is the one who will be different on each slide. In the screenshot it is set at 18 seconds. It means that once the playhead reaches the frame at 18 seconds it will be paused by the second decision in the PlayPauseAct. Since frame numbers are on project level, the first frame of the slide is used as reference. The Expression commands are needed to perform some math operation to calculate the exact frame number. This literal depends on the Timeline. Have a look at the Timeline of slide 4
For this slide the first parameter was set at 45 seconds:
For slide 5 this was the Timeline:
In this case the first parameter was set at 9 seconds.

On the last slide (6) I used the On Enter event to hide the Play/Pause and the Next button since they were no longer needed. 




Shared action to track State Number

Intro

In this post you can find a Captivate tutorial, illustrating 4 use cases where the state number was tracked and used to find a solution.

This post will explain the setup of one Shared action to track the state number, when a multistate object is clicked to advance to the next state. To explain I will use the first two (physics) use cases. The first one has 3 identical multistate objects, with 3 states, and two possible correct answers:

The second one has 4 identical multistate objects with 4 states, multiple correct answers are possible:

You can find one of the correct answers in those screenshots. The workflow will be described step-by-step.

Workflow 

Events

Both use cases have:

  1. Success event of the multistate objects which are used as buttons. These events will be used to advance to the next state and to fill a variable with the tracking number. The index start with 1, which means that the Normal state is state 1. Being this the only goal of all the multistate objects in both use cases, the use of a shared action is recommended over duplicated and edited advanced actions. The shared action will be labeled StateNumberAct.
  2. The Success event of the Submit button. The action triggered by this even will have two goals: first to check the answer, second to show the Next button if the answer is correct. For a wrong answer the learner can have another attempt at changing the states and submitting the new situation. Those actions are advanced actions, labeled SubmitAct_3 and SubmitAct_4. They are similar but not identical.
  3. The Success event of the Next button when it appears which is the Default 'Go to Next Slide'.
  4. The On Enter event of the slides which is a Reset action for the slide. These advanced actions are similar but not identical, and they are labeled EnterThreeStates and EnterFourStates. 

Variables

Each multistate object needs an associated variable to store the tracking number. Since that number will be used only on the same slide, the variables can be reused. They will be reset with the On Enter actions. The four variables are labeled v_1, v_2, v_3 and v_4 (only needed for the second use case). If you are a fan of my blog, you may remember that I have those variables in a shared action in my general library to be used as external library. See Creation of Variables.

For the shared action StateNumber Act an extra variable v_states is used to store the number of states in the multistate object. The value of this variable will be defined by the On Enter action of the slide.

StateNumberAct (shared action)

This action will be triggered by the Success event of each multistate object used as button:

It is a two-decision action. The value of the tracking variable (used as parameter 2) is defined by incrementing, while the command 'Go to Next State' is done on the multistate object. The second conditional decision checks if the maximum number of states is reached (stored in v_states) and resets the tracking variable to 1 in that case. The first parameter is the multistate object used as button, which is a compulsory parameter contrary to the variable which is a candidate parameter, needs to be indicated to be a parameter.

Sequence of States

The state numbers will be used to check for a correct answer in combination with mathematical operators. For that reason there is no arbitrary choice:

Use case with 3 states

It has two correct answers, left side of the equation sign needs always to be 'Force'. I choose this to be state 3.

To the right side of the equation sign it can be 'Area x Pressure' or 'Pressure x Area'. Those are in state 1 and 2, sequence less important. Reason: check for correctness will calculate the sum of the tracking variables to the right of the equation sign, which needs to be 3. That lead to a very simple condition. Try to figure it out, or wait for the next blog post.

Use case with 4 states

This is bit more complicated. Similar to the 3 state case, we can calculate the sum of the state numbers to the left and the right. This leads to a sequence of state numbers as shown in the screenshot at the start. In all cases that sum will result in '5', because it will be either '2+3' or '1+4', in all correct answers symbolized in this list:

  • 2+3 = 1+4
  • 3+2 = 1+4
  • 2+3 = 4+1
  • 3+2 = 4+1
  • 1+4 = 2+3
  • 4+1 = 2+3
  • 1+4 = 3+2
  • 4+1 = 2+3

However there is a 'booby trap' here! Because the condition based on the sum will also result in correct when the states on the left and the right side are identical. Example: 2+3 = 2+3 which is not a correct answer. More is needed than the simple sum condition. Any idea? Find the solution in the next blog post.



Intro to Tracking States

Intro

Multistate objects did change my workflows in Captivate a lot when they were introduced. Use the tag 'multistate object' or 'states' in my blog to see this proved. However I often miss the possibility to follow up states. There is no system variable for that purpose. Partially due to some questions on the forums, I set up some use cases to see the usefulness of state tracking. In this introduction you'll find a Captivate published output of 4 use cases and a short summary of the basic setup I used.

Example 

Check the tutorial below. These are the four use cases:

  1. Three identical multistate objects are used, and learner needs to reconstruct a physical formula by clicking through the states. Two solutions are correct:
  2. Four identical multistate objects, and another formula (related with the previous one). A lot more combinations are possible here, both sides need to result in the same Force.
  3. One multistate object, being a Carousel of 10 shapes (fSVG  text). Some requests (forum question):
       Flag number needs to be shown
       Back button only visible when in second state
       Forward button only hidden when in last state
       Next button on slide may appear only when all states have been visited
  4. Slot machine with 3 identical multistate objects having 8 states.

You can reach the rescalable version of this example using this link, or watch the embedded one below.


For the design I used some slides from the Quick Start Project 'Diverse'.

Basics for  Setup

Tracking variable

For each multistate object a user variable is defined. It will store the tracking number. I choose to have numbers identifying the state, with Normal being state 1, or in programming language: index starts with 1. None of the multistate objects in the example project has an 'empty' Normal state. If that were the case, the index could have been 0 which is the common approach for most system variables. However the system variable cpInfoCurrentSlide also has an index starting with 1.

For the use cases the state commands 'Go to Next State' and/or 'Go to Previous State' are used. So, it is necessary to reset the variable when either the last state or the first state is reached, to get a correct value in all situations.

Example for the first formula: once the third state is reached, the variable needs to be rest to 1 for the next click.

Events

This is more of a general tip when using advanced/shared actions. It is easier to set up a workflow if you can spread the actions over multiple events.  

For the first two use cases (formula): the multistate objects are interactive which leads to the use of a shared action because the check of the answer is done by clicking a button. This is also more user friendly: control over submitting the answer is given to the learner.

For the Carousel the multistate object is not interactive. Only the success events of the Forward and Back button are used. You'll see in the videos that this makes the action more complicated because all situations need to be cared for.

The slot machine is using JS for a random number and a While command, and can be triggered by the multistate object which is interactive. I added a Check button, to avoid a very complicated action. It is also the only example where I provided a Reset button (see previous blog).

On Enter event is used to reset variables and the situation on a slide. This is necessary when you allow to revisit the slides, but also because I tend to reuse variables.

State Choice

In the specific use cases of the formulas, the state tracking variable is used with mathematical operators to check for the correct answer. In that case it is important to choose a correct sequence for the states.

Example for the first use case: 'Force' is in the third state, because the used check function is to create the sum of the tracking variables for the first and the second state (1+2) which needs to be equal to 3 (third state). 

How?

I will post workflows for the use cases, including (interactive) video in future posts.


Multiple Failure Messages for Shape Button

Intro

Coincidence because this blog, answer to another forum question, is an alternative workflow to my most recent blog post about Software Simulation Assessments.

Summary of the request:

  • Learner needs to click a specific region, two attempts are allowed.
  • On Success the Success message appears and the project advances to the next slide.
  • On First failure a Hint message appears and an arrow indicates where to click. Moreover a Retry button appears.
  • When the Retry button is clicked the Hint text and arrow should disappear.
  • If second attempt is successful, Success message appears and the project advances to the next slide.
  • If the second attempt is failed, a Sorry message appears with a Continue button to go to the next slide.

Contrary to the previous article, the slide is created manually (no click boxes are added automatically as in a simulation). For that reason I preferred shape buttons over click boxes. A shape button can be made invisible by setting Opacity and Stroke to zero.

The same idea is at the origin of the workflow: at the bottom of the Timeline, a shape button (invisible to the learner) covering the full slide is added. Have a look at this screenshot of the Timeline of the first slide (Flags):

The Success event of this big shape button will trigger the FailureAct action to show the Failure messages. 

Sample project

Watch a scalable version using this link. The fixed resolution version is below:


The Timeline screenshot of the first slide (Flags) shows the objects on this slide, from bottom to top:

  • The shape button covering the slide SB_Back. This button will trigger an advanced action 'FailureAct' with the Success event!
  • Gr_Flags groups the four flag images
  • Title which function as instruction
  • A multistate shape SS_FailureThe normal state is invisible (same as the shape buttons), it has a state for the two Failure situations. The Hint message is stored in a user variable v_hint. Reason: this allows to time this message shape for the rest of the project. The workflow is needed in a sequence of similar slides, message can be hidden when no longer needed.
  • Shape button SB_Next, also a multistate object. I took out the Rollover and Down states, but it has a custom state 'Second' where the label changed to 'Continue'. 
  • Shape button SB_Flags, multistate object where the custom state 'Indicator' adds the arrow pointing to the correct location. This shape button is 'invisible' and over the Belgian flag on the first slide, over Portugal in the second slide (see screenshot belos). One of the advantages of shape buttons over click buttons: they can have custom states, and you can edit the form, needs not to be a rectangle:
  • The Text caption is added to show the state of the variable v_attempt. It is part of the debugging workflow, and I forgot to hide it before publishing.

Step-by-step

Variables

Two user variables are needed:

  1. v_attempt: has a start value of 0 and will be incremented on each failure (which is a click on the button SB_Backx).
  2. v_hint: will store the text to appear on the Hint message (first failure). Careful: you will need to increase the length of the inserted variable because 50 will not be sufficient in most cases.

FailureAct (Advanced Action)

This action is triggered by the Success event of the shape button SB_Back. The OP preferred to avoid Shared actions. You can assign this action to that shape button on the first slide, but you'll need a duplicate advanced action for each slide, because the color marked items need to be changed:

CleanAct (Advanced Action)

Action triggered by the Success event of the shape button SB_Next. Similar to the previous action, you'll need a duplicate action for each slide. The to be edited items are marked in color.

EnterAct (Shared Action)

It is a very simple shared action, with only one parameter. The text of the Hint is the parameter (literal). The reset of the other items has been done or is automatically happening because the option 'Retain State on Slide Revisit' is unchecked  for the multistate objects which is the default.
The following screenshot shows how the '{P}' button is clicked and opens the Parameters dialog box where you enter the parameter:

Success?

For the Success situation I just kept the default Success message. This is the Actions tab for the shape button SB_Flags and similar:

Two messages are allowed, Success 'caption' (is a shape) is activated, and the Last Attempt action is set to 'No action'.


Overview

The Advanced Interaction panel shows which actions are attached to which events:

Menu slide: forced view and different audio on revisit

Intro

Another post meant as answer to a more complicated question in the Adobe forums. You can find the (long) thread under this link. Title 'Play different audio on slide revisit' is not covering the final required situations. I will explain the end situation in short terms.

  • Project has a menu slide with 4 buttons. Each of the buttons jumps to a chapter of the course. There is narration on this slide, which needs CC and that means it has to be slide audio. That slide has staggered items synchronizing with the narration, and also several  effects applied to objects. The learner can click each button multiple times. Buttons are all active.
  • At the end of each chapter the learner returns to the menu slide. On return the playhead should skip immediately towards the end of the slide, when all the objects are in place and narration has finished. Except...
  • When the four buttons have been clicked at least once another audio clip needs to be played. That clip doesn't need CC.

The solution is less easy than I thought, hence this blog post. 

Example project

I created a barebone project for testing, using some slides from the Quick Start Project Safety. Have a look, to understand better what I explained about the request.



The course has 7 slides:

  • Slide 1: Title (poster image is based on this first slide)
  • Slide 2 = menu slide
  • Slides 3-6: one slide for each chapter
  • Slide 7: End slide

Analysis

The menu slide should appear in 3 possible states:

  1. First visit: default state, play head will start from the first frame and pause at the pausing point, narration (slide audio) and effects will be visible.
  2. Later visits, when not all buttons have been clicked at least once: audio shouldn't play and no need to wait for the staggered objects and their effects. The easiest way to realize both is using the shared action explained in this blog post:
    Force first view and/or play audio only on first visit
  3. Visit when all buttons have been clicked at least once: situation like in 2 BUT another audio clip needs to play. At the end of that clip something needs to happen. I choose to jump to the end slide, but this can be replaced easily by another command.

Have a look at the Timeline of the menu slide in the Example project:

You see the staggered objects including an entrance effect. Those are the white numbered shape buttons. The meaning of the top most button (SB_Done) will be explained below but you see that it has audio attached (object audio).

Step-by-step workflow

Variables

Create the user variables shown in this screenshot. The tracking variables (one per chapter) v_1 - v_4 are Booleans, default value =0. The variable v_skip will be populated with the duration of the narration audio clip in seconds. The variable v_audio gets the duration of the final audio clip. As indicated in its description v_buttons is meant for the sum of the tracking variables, which will be calculated whenever the menu slide is revisited.

Button SB_Done

Since it proved to be impossible to use Play Audio for the final audio clip in the project, I opted to use Object Audio. That type of audio plays when the object appears, or is made visible.  The shape button which I use is invisible because both Opacity (fill) and Stroke are set to 0. The eye button in its Properties is marked 'Invisible in Output'. The audio clip is added in the Options tab. The action nor the attempts matter, since the Jump to the last slide will not be done by clicking this invisible button. Have a look at the Style and Options tab in these screenshots:

ReturnAct (shared action)

This action is triggered by the success event of the Return buttons at the end of each chapter, it is pretty simple to understand from the Preview screenshot:

EnterAct (advanced action)

This action is triggered by the On Enter event of the menu slide, takes care of the three possible situations (see Analysis above). Both conditional decisions are mutually exclusive because they are based on the value of the sum variable v_Buttons.

I could have used JS to calculate the value of v_buttons to avoid the sequence of the 3 Expression commands.

If you want to reuse this action for other projects, I would recommend to convert it in a shared action. Be careful with the two literals (duration of both audio clips). They can be tricky, and it may be better to replace them by variables getting their value in the Variables dialog box.

Overview: Advanced Interaction

This screenshot shows all events and actions in the example project.


Randomizing in Captivate

Intro

Randomizing exists in some limited situations in Captivate:

  • Question pools allow to add randomized quiz slides to a project.
  • Shuffle feature for several question types can be seen as randomizing.

However in all other situations you need to use JavaScript to get a randomized number (or text). This short blog is meant as an answer to a user request in the eLearning community, to be found under this link. In my blog you will find multiple examples of randomizing for games. This is a very simple example since the user only wants to have a random card chosen from a deck on clicking the deck. A second click on the deck needs to flip back to the cover of the cards.

Example file

There is only one slide in this project besides the Title slide. The three (tarot) decks are identical, have 14 cards. Try it out. You may get some ideas how to use this workflow for games. In the future I will post more examples of this workflow in a bigger tutorial project. 

This example can be watched below (fixed size) or you can click this link for a rescalable version.


Step-by-step workflow

The timeline of the tarot slide shows the three decks. Each deck has a Click box on top of the deck, which will trigger an advanced action with embedded JavaScript. I hear you exclamations! Why not use the deck itself (PNG image) as interactive object. It is impossible because JS is used to change the state of the object, and it is impossible in that case to use the image itself as button. Of course that is annoying, because a responsive project with Fluid Boxes will not allow stacking of the click box with the multistate object in the same location. You would need a button in another location. For a non-responsive project (like this example) it is not a problem.

Multistate object (deck)

Decks are multistate objects with 15 states. The Normal state shows the cover. Due to the script the labeling is important for the other custom states. They are all labeled Cardx  where x is a number corresponding with the rank of the card. The three decks in the example are identical, but you can have decks with a different number of cards, just use the same logic for the numbering. Look at the Object state panel for Deck1:

Variables

In Captivate I need only one variable for each deck to follow up the status: is it showing the cover, or a random card? Two possibilities means that I can use a Boolean variable. When the cover is visible, the variable has the value 0, for a random card it has the value 1.

Advanced Actions

Click boxes trigger a conditional advanced action. Here is the action for the first click box (CB_1) over Deck1:

The Boolean variable v_1 is checked. If it has the value 0, a random card needs to be shown which is done by a JS script (see below), and the variable is toggled to 1. If it has the value 1, the cover (which is the Normal state) is shown. 

For the second and third deck, the variable and the name of the deck need to be edited.

Javascript

The used trick is to create the name of the state by concatenation of two strings:

  • First string is always 'Deck1'.
  • Second string is a random number between 1 and 14, converted to string.

I have explained in depth the use of Math.floor(Math.random()*(max-min))+min) in an older blog post:

Playing-with-numbers-part-1

That random number is converted to a string with a JS method. Result of the concatenation is the name of one of the states in the deck multistate object. 

For the second and third deck, the deck name need to be changed in this script. If you do have more or less cards in those decks you need to edit the maximum number (here set at 15).

More ideas?

This basic example may have ignited your creativeness? What about creation of a jackpot game? A funny mathematics exercise for your kids? A board game where you use a dice? 

For this use case it is impossible to create a shared action. One of my long-standing feature requests for actions is the possibility to generate a command using concatenation. A second one: being able to change a state based on a variable.






Comparing Advanced and Shared Actions

Intro

If you have followed me since a while, you know that I am a great fan of Shared actions.  However I am aware that many developers seem to be afraid of those shared actions. In this post I will try to demystify the 'shared action', and answer some questions.

First of all: the biggest advantage of a shared action is its reusability. Whenever you need an action which will be used multiple times in a project, or which you plan to use in more than one project, it is worthwhile to consider the use of a shared action. Here are some other reasons. You can skip this part and come back to it later:

  • When used within one project, you are using instances of the same shared action. If you prefer using duplicated and edited advanced actions the file size will be bigger. It can be compared with the use of multiple instances of the same graphic/audio clip.
  • Shared actions appear in the Project Library with all the functionalities of Library assets: how many times uses, on which events etc..
  • You can transfer an existing advanced action to a new project using copy/paste of the object triggering the action: a button, click box, TEB (success/Last attempt events), slide (Enter/Exit event). If variables are used in the advanced action, they will be created in the new project. However, in many cases, commands in the advanced actions will revert to Continue if what they are referring to is not available in the new project. Example: missing slides for navigation commands, missing states or even multistate objects...  
  • Transferring a shared action to a new project is a breeze: drag the action from the original Library to the Library of the new project. Variables which are not used as parameters will be created (similar to copy/paste for advanced actions). Since the shared action is not connected with any event, you don't have to bother about having everything in place before transferring the shared action.
  • There is no built-in way to document Advanced actions in Captivate. A shared action however allows to add a description to the action and to the parameters if any are used. 

There are some limitations to shared actions:

  • It is not possible to trigger a shared action from a hyperlink.
  • You cannot attribute a shared action to several events at once, as is possible for an advanced action.

Beware: not all advanced actions are suited as shared action. In a recent post about 'Hint after x failed clicks' I explained a use case which was meant as introduction for Captivate users new to variables and advanced actions. You may have a look at that first blog post:  https://blog.lilybiri.com/automatic-hint-after-x-failed-clicks

Conversion to shared action

It is a good idea to create and test the action as advanced action before creating the shared action. This was the advanced action  created in the mentioned blog post, triggered by the Success event of the  'wrong' hotspots (5) in the example:

Two user variables were used: 

  • v_attempts tracks the number of clicks on the button/hotspot
  • v_failure is used in the Failure feedback message and allows to change the content of that message. The default failure message will be replaced by a Hint message after the defined number of clicks.

First version Shared Action

Open the advanced action in the dialog box, use the button Save as Shared action, and this dialog box will appear:

In the screenshot you see that I have filled in the description. It is important to do so, try to explain in short sentences what the action will do exactly. It may seem a loss of time, but if you reuse the action a couple of months later, you'll understand why I emphasize this.

In the main part you see the 'parameters', and in this particular case all of them show the green check mark. This means that you can save the shared action as it is. Result will be that the parameters remain static, cannot be changed when you attach the action to an event.  They will not need a description neither. Comparing with the advanced action:

Pro

  • The description of the action, which is impossible for an advanced action.
  • Its appearance in the Project Library with all the functionality of other assets.
  • For reusability in another project: you can drag the shared action from this library opened as external library to the Project library of the new project. For an advanced action you would need to copy/paste one of the wrong hotspots to the new project.

Con

  • You cannot attach the shared action to all wrong hotspot events at once, you need to do it one by one. The advanced action could be attached in one workflow by selecting all the wrong hotspots.
  • For another hotspot slide in the same project it will be easier to create a duplicate advanced action, and edit the Hint text (value for the variable v_failure).

Second version Shared action

In the first screenshot I marked two parameters with a question mark:

  • Parameter '2': literal indicating the number of required wrong clicks before showing the Hint.
  • Parameter 'Click on the icon 'Responsive project'': the new value (literal) for the variable v_failure to replace the failure text by the Hint text.

You can make the static parameter dynamic by clicking the check box, and entering a description for the parameter. To me the most important candidate is the Hint text. Making that parameter dynamic, means that you can enter a different Hint text for each new attachment of the action to an event. Beware: the correct checkmark will only appear after confirming the description of the active parameter:

This makes the action flexible: you only have to enter the Hint text as parameter whenever you attach the shared action to an event.

Pro

  • Besides the description of the action, the meaning of the parameter will appear whenever you apply the shared action.
  • Its appearance in the Project Library.
  • Reusability in any new project remains.
  • File size will be lower compared with using duplicate advanced actions.
  • You can edit the Hint text for each instance.

Con

  • You cannot attach the shared action to multiple events at once.
  • You need to fill in the text parameter with each attachment (copy/paste is possible)

Third version Shared action

You can make the action even more flexible by declaring the number of wrong clicks to be a dynamic parameter.  Using that shared action you'll be able to change the number of wrong clicks before showing the Hint instead of the Failure message.  Like increasing the number for a more complicated hotspot slide. I don't have to explain this screenshot anymore:


More tips

I may write out a third blog about using this shared action as template for advanced actions, including possible enhancement by adding graphical (audio) assets to the Hint text message.

If you want to learn more about using Shared actions, please have a look at my 'crash course'. 

Shared Actions : intro

Lesson 1 (video)

Lesson 1 (step-by-step)

Lesson 2 (video)

Lesson 2 (step-by-step)

To circumvent the "Con" of shared actions not being able to apply to multiple events at once, remember that you can easily create an advanced action from a shared action. Here is an example:

Using Shared action as template



Automatic Hint after x Failed clicks

Intro 

This short blog post is created to answer a question in the Adobe forum about clicking an interactive object with multiple attempts. After two wrong clicks, the Retry message should be replaced by a Hint message. There are multiple workflows possible, but I tried with this simple solution to use as much of the existing features as possible.  The Hint will be only text. A more elaborate solution could be a Hint where the text is accompanied with a highlight box and/or other graphical elements. If useful, could create such an example as well. This one is meant for relative new users of Captivate, hence the step-by-step workflow.

Example

Watch this published 3 slides project, using this link (for a scalable version).



On the second slide you'll see the results of the workflow: learner is asked to click the correct button. Number of attempts was set to Infinite but could also be lower. First two wrong clicks lead to a Retry message, on the third wrong click the Hint message replaces the Retry message.

Workflow

Slide setup

Have a look at this screenshot, where the slide (2) and its timeline are visible:

The six interactive objects are shape buttons (Alpha and Stroke both set to 0) over the buttons of the image. One of them deserves the correct click and the other ones are wrong choices. All buttons have the default pausing point at 1.5secs. They will all trigger an advanced action, which means the slide will remain paused. You see the Correct feedback message, using the Default Success Shape style (messages are no captions, but shapes).

Variables

The workflow needs setting up two user variables using the Project menu, option Variables:

  • v_attempts will track how many times a click has been done. Its default (start) value is set to 0. Its value will always be numerical.
  • v_failure: will have a text message. In the screenshot of the variables dialog box you see the default value. However it is not really necessary to define that default value if you use the Reset action described below and triggered by the On Enter slide event. 

The first variable is easy to understand. The variable v_failure will be used as placeholder in a default feedback message. That makes the message 'dynamic': by changing the value of the variable, message text will change. This is the only way to achieve such a change, because those default feedback messages do not support multiple states (although the States button is active, you cannot add states). You'll learn which message to use in the next part.

Events and Advanced Actions

As mentioned before, I did set up the 6 shape buttons with Infinite Attempts. This means that they are left with only the Success event, which occurs on clicking the button. Only the Success message will be necessary. That may seem illogical, is linked with the Captivate meaning of Success and Failure. Success means the button has been clicked, Failure means the click happens outside of the button. You understand that clicking outside of a button is useless here.

Setup SBCorrect

Clicking the Correct button should result in navigation to the next slide with the simple action 'Go to Next Slide' (happens to be the default simple action). That navigation will not happen immediately after clicking the button because the option 'Pause for Success/Failure Captions' is activated. Display time for those messages (because they often are not in a caption, but in a shape) is 3 seconds, can be changed in the Timing Properties. See the full setup in this screenshot:

The correct feedback message can be edited on the stage, uses the Default Success Shape style.

Setup 5 SB_Wrongx 

Dynamic Message

Clicking the Wrong buttons will also show the Success feedback message, and you'll get 5 of them. For the learner they should look like Retry (or Hint) messages, so I choose another Shape style for these messages (see screenshot Slide setup). Since they are linked to their buttons and all appear in a different location I also used the Align, Align and Resize to the same size from the right-click menu after selecting the 5 messages.

The trick here is to fill those messages with the same user variable v_failure to replace the normal success text. Do this by using the X-button in the Character part of the Properties panel of the message while in editing mode:

That X-button will show the 'Insert Variable' dialog box. User variable is the default choice, you just need to choose v_failure from the dropdown list. Important: the default 'length' is set to 50 characters, if you expect a longer text increase that amount. In this screenshot I increase it to 100:

Advanced Action FailureAct

This is a screenshot of the Preview window of that action:

You see that this action has two decisions:

Decision 'Tracking' is non conditional. It consist of one Increment action for the variable v_attempts.

Decision 'Message' is conditional, has only the THEN part, not an Else part. When the attempts are greater or equal to 2, the text in the variable v_failure is changed to the Hint text. Of course it is possible to change that amount of attempts if wanted.

EnterSlide Action

If you allow the learner to revisit the slide, and want to have the identical situation of the first visit, it will be necessary to Reset the variables. You'll need this non-conditional advanced action, to be triggered by the On Enter slide event:

Both variables v_attempts and v_failure are reset to their original values. Because an advanced action is not releasing the play head, I added Continue. In this example it is not really necessary, but it would mean that the play head remains in the first frame and is not advancing to the pausing point at 1.5 secs. It is possible with other setups, like having an effect or animation that you need that release of the play head.

Forced view for Tabs Interactions - Shared actions as template

Why?

Recently the question appeared a couple of times in the forums: is it possible to delay the appearance of the Next button until all tabs in the learning interaction Tabs have been clicked.  This ‘Forced view’ request has been documented many times for normal click/reveal interactions and for a branching scenario. However the limitation of all learning interactions to the provided editing functionality prevents an easy way to realize such a scenario. Same is valid for Accordions, Timeline, Pyramid etc… interactions.

My recommendation is to use one of the multiple interaction slides from the Quick Start Projects (version 11.5, Assets panel). They do not offer Forced viewing out of the box, but can be transformed to do the trick. Have a look at the published example.

Warning: This blog contains three short video clips, it may some time to load completely on your system.

Example project

In this example I took 3 ready-to-go slides: one from the Safety, the Alliance and the Earth projects. The existing actions have been edited and you’ll get the Next button only when all tabs on a slide have been clicked:


The embedded example has a fixed resolution. You can also use this link for a scalable version.

How?

All was done using two shared actions, which you’ll be able to download in a Library project:

  1. VarsCreateForceTabs: is used to create the needed user variables, and acts also as reset action On Enter for each slide. In this particular case the same action (one parameter) could be used directly. However if more is used in the On Enter action, the shared action can be used as template for a dedicated advanced action.
  2. ForceTabs: has been used only as template for all the advanced actions on the 14 tab buttons in this project. I will describe the workflow step-by-step in a future blog.

If you want to try the workflow (described below) out, download this project which has the two shared actions in its Library. In an older blog (or video)  I explained how to import those actions in any project using External Library. Download the project from this link:

SA_Library

Workflow

Step 0: Next buttons

Add the Next button to each slide, and hide it in output. I labeled them SB_Next_Earth; SB_Next_Safety, SB_Next_Alliance 

Step 1: import the shared actions to your project

  • Open the Library panel in your project. Scroll to the Shared actions subfolder.
  • Use File, Import, External Library and point to the downloaded project file. It will appear in a floating panel top left of your screen.
  • Find the Shared actions folder in that external library and select BOTH shared actions.
  • Drag them to the Shared actions folder in your project library. They will both appear with a usage of 0. But the variables used in those actions will now appear in the Variables dialog box (Project, Variables). 

You can watch this step in the video below as well.

Step 2: use VarsCreateForceTabs action as Reset action

  • Check the On Enter event for the Quick Start Project slide you want to use. In many case that will be the default action 'No Action'. If that is the case, apply the Shared action 'VarsCreateForceTabs' to the event. It will need only one parameter: the number of tabs. 
  • If the On Enter event triggered another action than 'No action', screen that action. In many cases it is a superfluous action. One example is the 'Horizontal Tabs' layout in the Business project. It has an On Enter action to reset states to the Normal state, but that action is not needed since such a reset happens automatically when you re-enter the slide. Reason: the option Retain State on revisiting slide is unchecked.
  • If the existing On Enter action has to be done, you need to use the Shared action as template to create an advanced action. In that advanced action you'll need to add the existing action, which can be done by copy/paste eventually on a new decision tab. In the available Quick Start Projects the On Enter actions are never conditional. 
  • Using the described workflow, the Next button will remain visible when the slide is revisited. That is mostly the required situation: only on a first visit clicking all the tabs is required to get the Next button, but later on that is no longer the case.

Second step is also shown in this video clip:

Step 3: use ForceTabs as template for Tab action

  • Select a Tab button on the slide. In the following screenshots I selected the first button on the slide from Earth, which will have the name C2R37_BTN_xx  (xx will be a number added by Captivate to make the name unique).
  • Check its action in the Properties panel, Actions. Open that action in the Advanced Actions dialog box.  For all the ready-to-go slides with a similar Tabs interaction, those actions always have one standard decision. No IF conditional decisions, nor While loops
  • Select all the commands in that action, copy them to the clipboard (Edit menu, right-click menu or with CTRL-C).
  • Open the shared action 'ForceTabs' from the dropdown list top left (starts with Blank). You'll need to fill in the two parameters in the dropdown lists. First parameter which appears in the two first decisions is the tracking variable. Second parameter in this case is the Next button, which was hidden in output. A Preview of such a filled in shared action is visible in this screenshot, created for the first tab button in the slide taken from the Earth QSP:
  • Return to the first decision 'Always', on the second line (after the 'Increment' command), paste the commands copied to the clipboard (CTRL-C or from the menu).  Save the advanced action with a unique name. For that same tab button as the previous screenshot, this would result in:
  • Assign the new advanced action (in the example SB1_Earth_act) to the tab tutton.

You will need to repeat this third step for each of the tab buttons. Eventually you could also duplicate the advanced action for the first tab, and edit the duplicates. Do not forget to copy the commands from the original advanced action on the tab to the first decision 'Always' after the Increment command. In that scenario, only the first parameter (tracking variable) needs to be edited, but in the first AND the second decision. If you start from the shared action as template you need to define that parameter only once. However you don't need to edit the last decision, because the Next button will be the same for all the tab buttons if you work with duplicate advanced actions.

Here is the video clip for the third step:

Conclusion

Although this blog was meant in the first place to answer a forum question, I had a hidden agenda (a badass?):

  • Using shared actions as template
  • Using shared actions to avoid creating variables over and over again
  • Combining existing advanced actions with filled in shared actions
  • Understanding and extending the use of Ready-to-go slides from the Quick Start Projects.


Custom MCQ slide with multiple correct answers

Why?

Recently a user posted a request on the Adobe forums, asking for a Multiple Choice question to be used as Knowledge Check, but with possibility of multiple combinations of answers to be correct. Here is the link:

MCQ with more than one correct answer

Example project

I used some slides from the QSP Alliance to create quickly this example project.  It has 3 MCQ slides which are using the same shared actions. For the answers I used placeholder text, so that you can recognize the 'correct' and 'wrong' answers. All questions have 6 possible answers but the workflow is not limited to that specific number of answers. The total number of correct and wrong answers is different on each slide, workflow is flexible enough to cope with those differences. Answer is considered to be correct when no wrong answers are selected and at least one correct answer is chosen. But multiple correct answers are allowed as well. It would be very easy to add scores to the MCQ slides. At this moment they are set up as Knowledge Check slides, with Infinite attempts. You cannot proceed to the next question before having posted a correct answer.

You can watch this project using this link for a scalable version, or the fixed resolution embedded version below:



Workflow Setup

Slide setup/Multistate objects

Have a look at this Timeline screenshot of the most important objects on the MCQ slides:

From bottom to top you see 

  • The 6 shapes (black) which are used as shape buttons, who will trigger either a CorrectAct or a WrongAct shared action. Their names start with SB. They have an extra custom state 'Checked' to indicate when they are chosen:
  • The Submit button. Each slide has its Submit button. A custom 'Retry' was added to replace the Normal state for later attempts than the first attempt. The option 'Retain State on Slide Revisit remained unchecked.
  • A multistate shape SS_Message which has an empty Normal state, two custom states (see screenshot). This object is timed for the rest of the project (and hidden on the End slide with its On Enter action). The option 'Retain State on Slide Revisit remained unchecked.
  • The Next button SB_Next which is also timed for the rest of the project (and hidden on the End slide with its On Enter action).

Variables and events

8 user variables are used:

  • Six tracking variables of the Boolean type, labeled v_1, v_2.....v_6 - one for each possible answer. Their default value is 0, will be toggled to 1 when that answer is chosen. 
  • Two counter variables v_correct and v_wrong which will track the Correct and Wrong answers which are checked.

The used events are:

  • Enter slide event for each MCQ slide, for a reset action 'EnterAct'. 
  • Success event of the answer shape buttons SB_x to trigger either the 'CorrectAct' or the 'WrongAct', which are both shared actions.
  • Success event of the Submit buttons to trigger a specific advanced action 'SubmitActx'.
  • Enter slide event of the End slide to hide the messages shape SS_Message and the Next button. That Next button kept the default action 'Go to Next Slide'.

Actions

EnterAct

This Reset advanced action is triggered On Enter for each MCQ slide, it is self-explanatory. I used an advanced action in this case, based on a shared action CreateVars, which I use all the time to create a bunch of variables. 

CorrectAct (shared action)

This shared action is triggered by the Success events of the answer shape buttons which have the correct answers. Only two parameters are needed: the button itself and its tracking variable. As you may have read in my Tips about Parameters using numbers in the names makes the assignment of the parameters a lot easier:

WrongAct (shared action)

Similar to the previous action, using the same two parameters:

As you may know both shared actions appear in the project Library, easy to check with Usage if they have been assigned correctly:

SubmitActx

Due to the change state needed for this button, there is an individual advanced action for each Submit button:

EnterEnd

A very simple advanced action for the On Enter slide event of the last slide, to hide the Next button and the multistate Message shape, both were set till the end of the project.