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.

Reference/Registration point in Captivate?

Intro

The origin of this article is (again) due to a forum question: "I want to rotate a triangle around a certain point" using the Rotation effect. It is time to explain the importance of the reference or registration point for objects in Captivate. In other Adobe applications like Illustrator, InDesign, Animate you have lot of control over that point. Look at this small screenshot: it shows that reference point in two different locations. Sorry for the low resolution, it is very small in Illustrator: left image shows the reference point in the left center, the right image at the bottom right. It was that last point that was wanted by the OP in the forum, but ... Captivate doesn't allow changing the reference point.

Reference points Captivate

The Reference/registration point in Captivate is used in different situations. In some situations it is located at the top left corner of the bounding box, in other situations in the center of the bounding box. The 'bounding box' is the rectangle surrounding the object or the object group. You'll see it during editing, when selecting an object or a group.  The visual presentation of that box on the stage is not looking always exact, it can look larger than it really is. The correct size (px) of that box can only be seen in the Options tab of the Properties panel. 

Location, resizing, rotating

The X and Y value in the Options tab are the coordinates of one of the registration points: the top left corner of the bounding box, as you can see in this screenshot:

The red lines in this screenshot are guides. The dotted square is the bounding box. The blue circle indicates the first reference point, which is top left and has its coordinates in X and Y in the Options tab. If you uncheck the 'Constrain Proportions' option, and increase the Width (W) or the Height (H) you'll see that the reference point will not move, increasing width will move the right border of the bounding box, increasing height will move the bottom border.

However, if you use the Rotation button on the stage, or the Rotation option in the Options tab, the used reference point is no longer the one indicated by the blue circle, but the center of the bounding box, which is indicated with a white circle in the screenshot. Same point is used for Flipping and 90° rotation buttons in the Options tab. The reference point will (weirdly) not change in the X, Y coordinates when you rotate an object as is visible in the next screenshot: you see that the X/Y still references to the blue circle center, which is no longer part of the bounding box of the shape:

Aligning

If you align two or more objects (use the Align Toolbar which you can open by Window menu) the result can be surprising. Have a look at this first screenshot: I kept the rotated arrow, added a rectangle with exactly the same width (300px), and having the reference point at the same X value. That means that the center point of both shapes has the same X value as well, centering the shape will not move them.  In a first test, I selected the arrow first for alignment (see right image in screenshot). 

The result for left align is to be seen in the left image: the most left point of the bounding box of the arrow has been used as reference. When the bounding box is turned off, there seems to be no 'alignment' between the shapes. The second image looks better.

Same alignment rules when you use grouped objects instead of single objects. The bounding box of the group is what matters.

Effects

For all effects the center point of the bounding box (white circle in the very first screenshot) is the absolute reference point. It is the case for all categories of Effects. Especially for motion effects, the new Guides are very handy to locate the start, end and intermediate points of the motion path as I showed in this post: Guides Rule!.

That was the original question which I mentioned in the introduction: how can you rotate an object, not around its center but around another point.  Since version 9 it is possible to apply an effect to a group. You cannot have individual effects for objects that are grouped (which is a pity). But in this case effect on a group provided a workaround for this particular question: 

  • Add an object that is 'invisible' to the end user, like a shape with a Fill Alpha = 0 and a stroke = 0.
  • Group that object with the object to be rotated, in such a way that the center of the group bounding box coincides with the rotation point you want to use.

This sounds more complicated than it is really. Have a look at this visual presentation: the wanted rotation point was the right bottom point of the triangle. Duplication of the triangle with rotation provided me with that 'dummy' object which I made invisible to the user (here I added a light grey border to make it visible):

The red lines are guides which will not be visible on publishing. You see in this screenshot that the bounding box looks bigger than it really is, because its exact size is indicated by the red guides.