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

Intro

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

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

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

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

Dashboard Setup

Situations

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

Show/Hide workflow

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

Use these events and actions:

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

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

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

Multistate object workflow

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

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

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

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


Next?

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