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.


About State Commands and a Progress Bar

Intro

Recently a user posted a question about using the 'Go to Next State' command used in Advanced actions. You can read our discussions in this thread.

Time to write out some tips for multistate objects. This blog wants to give an answer to the user, and has its focus only on that solution. I plan to publish more about the basics of states and their commands later on.  To me personally the introduction of multistate objects is in the list of my favourite features in Captivate, closely following Shared/Advanced actions and Shape buttons.

Example movie

Watch this published rescalable interactive movie. The second slide has three shape buttons, navigating to three slides where you can read and confirm reading, or click hotspots, or answer questions. Each of your actions will result in changes to the progress bar on that second slide. Beware: whenever you have clicked an interactive object it will be disabled!


Terminology Multistate objects

InBuilt States and Custom States

You can add custom states to any object, static or interactive.  In those states you can have many object types: graphics, video, audio... but no interactive objects nor hyperlinks.  The Normal state is the default state, which will always appear unless you have changed to a custom state using a command (in a simple or an advanced/shared action). You have a lot of freedom for custom states: contrary to the InBuilt states, nothing is locked tto the default normal state. You can have objects in a custom state that are in a totally different position from the Normal state. Custom states are always controlled by commands, not by a situation. If you want a custom state to remain for future visits to the slide where the multistate object is sitting, you need to check the option 'Retain state on slide revisit'.

Inbuilt States exist for these object types:

  • All types of buttons Shape buttons, Image buttons, Transparent buttons and Text buttons.  You have four of those styles: Normal, Rollover, Down and Visited. The first three are part of the button style.  You don’t have the same freedom for location of those states, they are locked to the Normal state (look for the Lock indicator).
  • Drag sources and Drop targets on a D&D slide. For more information see: InBuilt states for D&D

I will only talk about shape buttons here. Contrary to custom states Inbuilt states appear automatically in a situation: when not hovering over button (Normal), when hovering over button (Rollover), when pressing button (Down) and when after clicking/tapping (Visited, if it has been created). You can only control Normal and Visited by a commandif necessary, not the Rollover/Down states.. 

State commands

These commands are available both in a simple action (dropdown list in Actions) and in the Advanced Actions dialog box, to be used in advanced or shared actions:

  • Change State of …. to 
  • Go to Previous State  …..
  • Go to Next State ….

When you use these commands as a simple action, from the dropdown list inthe Actions tab, they can only be applied to multistate objects on the same slide as the event triggering the action (Slide event, interactive button events) The Hypelink even thas only the first command (Change State). 

If you insert one of the commands in an advanced/shared action they seem to be able to apply also to multistate objects on other slides. That is indeed the case for the ‘Change State’ command, but is NOT functional for the commands Go to Next/Previous States. I have logged this as a bug, because you are able to choose multistate objects on other slides, however without any effect. That was the reason of the question in the forums, described in the Intro. 

You could see in the Example movie that I have a workaround. How?

Solution with variable and While loop

YOu will need one user variable v_counter,  to track the number of clicks while being on other slides than slide 2 with the Progress indicator SS_Progress (a multistate object). This progress indicator starts with a Normal state which is a shape with Alpa and Stroke = 0.

That variable starts with a default value = 0. The clicks on the OK buttons in slide 3, on the hotspots in slide 4 and on the correct answers in slide 5 do increment the variable, besides other commands. 

When returning to slide 2 (which has the progress indicator) using the shape button ‘Back to….’ (is on the used content master slide) an advanced action On Enter for that slide is launched, using the While loop:

Example: if the user has performed 3 actions on any slide, v_counter would be 3. The while loop will then be done 3 times, which means the 4th state of the progress indicator will appear. At the same time, the variable will be set back to 0 at the end of the loop. The learner can continue to visit another slide, and the variable is ready to track again.

This is just an example, many variations are possible. Maybe you want to allow visits and actions to consecutive slides before returning to the main slide, this can easily be achieved. Or have feedback appearing on the main slide after all slides have been visited, based on the obtained progress.. 

More?

I didn’t explain all actions in this post. The slide with the hotspots is based on a recent article about Hotspots in a 2D image.

Maybe you are wondering if I used the Visited state or a custom state for the OK buttons (slide 3) or the hotspots? What the quickest workflow is to create the states for the Progress bar? Did I use shared actions or advanced actions, and why did I choose that way? Why did I disable the buttons? If you are interested, I can explain… on demand.