System variables in Captivate 6

Intro

Update: for readers using Captivate 7-9, updated list with system variables in this article.

Quite a while ago I wrote some articles about using variables in Captivate 5. And they had links to complete lists with the system variables available in that version. Nothing much changed for 5.5 but now in version 6 there are not only a bunch of new variables, but the old variables starting with 'rd' have disappeared (from lists). At the end of the article you'll find the link to download a pdf with all the system variables, grouped in categories. For each variable I offer you the explanation (not always the same as in the Variables dialog), the type (number, text, Boolean or other), Default value (if available), comment (sometimes with a link to an example). 

In this article I will focus on some tips, and on the new variables in the categories.

1. Movie Control

This category is very important, because most of the system variables here can be controlled by using simple or advanced actions. One exception: cpCmndPlaybarMoved is an internal variable, read-only.

Deprecated old variables starting with 'rd' have been replaced, in the list those names are orange instead of white. Their functionality remains the same. 

  • cpCmndGotoFrame & cpCmndGotoFrameAndResume
  • cpCmndNextSlide & cpCmndPrevious
  • cpCmndPause & cpCmndResume

Warning: in version 5.5 both variables cpInfoCurrentSlide and rdInfoCurrentSlide (see next category) existed, now the last one is not available in dropdown lists any more. But they were not identical: numbering for cpInfoCurrentSlide starts with 1, whereas it starts with 0 for rdInfoCurrentSlide! In a some of my blog posts about 5/5.5 I used this statement to Replay a slide in advanced actions:

Assign cpCmndGotoSlide = rdInfoCurrentSlide    (in CP5/5.5)

This worked fine because both variables started with index 0. In 6.0 you can still create the same statement, by choosing the option 'literal' instead of 'variable' and typing in the rd-variable (not available in the list). If you do not like typing, you have to replace the previous statement by:

Expression cpCmndGotoSlide = cpInfoCurrentSlide - 1  (in CP6)

This explains the perhaps confusing snippets (small advanced actions) attached to the shapes in the button category. Have a look at the buttons Start (snippet: startSlide) and End (snippet: lastSlide).

New variables: only one cpCmndTOCVisible allows you to show/hide the TOC if this is in Overlay mode. It is a Boolean variable, with default value = 0, which means that the TOC is not visible.  Too bad that this variable was not added in the dropdown list for "Assign" in the Actions accordion. This list only shows these variables like in previous versions:

  • cpCmndShowPlaybar
  • cpCmndMute
  • cpLockTOC
  • cpCmndCC


2. Movie Information  

All the variables in this category are read-only. They are often used in combination with the Movie control vars described above.

Deprecated old variables: marked again in orange in the table:

  • cpInfoCurrentFrame
  • cpInfoFPS
  • cpInfoFrameCount & cpInfoSlideCount

Not replaced: rdInfoCurrentSlide  (see Warning in 1. Movie Control)

New variablesnone

 

3. Movie MetaData

Those variables are also read only. Most values are looked for in the fields of the Project Information dialog box. Two mystery variable are cpInfoCourseID and cpInfoCourseName.  The explanation in the Variables dialog box points to the same Project Information, but no fields are available there. I also checked if they point perhaps to the SCO information, but seems not to be the case either. Perhaps the mystery will be cleared ... in version 10? 

No new variables, no deprecated ones neither in this category.

These variables are useful to insert in Text Captions on (master) slide or in templates, instructing the user to fill in the fields in Project Information.

 

4. System Information

Logically those variables are also read-only, can be useful in the same way as the variables of the previous category. Sorry for the comments about certain variables that seem to assume that all Captivate users should be American. 

No new variables, no deprecated ones neither in this category.

 

5. Quizzing

All variables in this category are (still) read only. With a lot of new features in Quizzing, there are several new system variables available. Not enough for me, as you can detect from some of my comments in the table. 

There are no deprecated old variables, all were already cp-variables.

New variables

cpInQuizScope: Quiz scope is now dynamic, whereas in previous version the scope was very 'rigid', linear, starting with the first slide having a scored object (question slide or scored interactive objects) and finishing with the score slide or - in case of no score slide - with the last slide having a scored object. No way to jump out of that sequence of slides, which caused a lof ot frustration. In Captivate 6 the scope starts the same way, but now the scope will extend dynamically when the user jumps out of the sequence to view a content slide. It will only end when the user views the score slide. This system variable, if you insert it in a text caption (on master slide or timed for all the project) will show you whether you are in a quiz scope. It will have the value 0 (default) before the first slide with a scored object. Then its values switches to 1, will remain so until the score slide has been viewed.

cpQuizInfoNegativePointsOnCurrentQuestionSlide: Penalty is now possible, and this variable will show the maximum Penalty on each question slide, it is a reused variable. Its positive companion is cpQuizInfoPointsPerQuestionSlide. Do not confuse with the points scored by the user for a question slide, which will be stored after the slide in the variable cpQuizInfoLastSlidePointScored.

cpQuizInfoPretestPointsscored:  this will be populated with the score obtained for pretest question slides only. Its counterpart for the real test is cpQuizInfoPointsscored. This last variable is visible on the score slide.

cpQuizInfoPretestScorePercentage:  is the pretest version of cpInfoPercentage (which is for the real test, visible on the score slide).

cpQuizInfoPartialScoreOn: for questions where you choose the option partial scoring this variable will have the value 1, whereas the default value (no partial scoring) is 0.

Missing variables

I really think some more variables should be available. If you have a look at the Advanced Interaction view (F9) for a project that has a pretest as well as a normal test, you will see that the value of Total Points is the sum of the maximum possible scores for both pretest and test:

This shouldn't be a problem, you can see clearly the difference in this view between the pretest and normal test questions. But I have problems with:

  1. cpQuizInfoTotalProjectPoints/cpQuizInfoTotalQuizPoints: both variables will have the same value after the project, although they are not populated at the same moment. BUT: this will be the same total as you see in the Advanced Interaction view. This means that you do not have the separate values of the maximum for the Pretest and for the Test, and that there is no system variable available for the maximum score that is visible on the Score slide (which is for the Test only). If you want to create your own score slide, you'll have to do some maths yourself or by advanced actions. Same if you want to show a score slide for the Pretest alone (which is by default not available).
    I would like to have a system variable for the maximum score of the Pretest (that is used by CP to calculate cpQuizInfoPretestScorePercentage) and for the maximum score of the Text (use by CP for cpInfoPercentage).
  2. cpQuizInfoTotalQuestionsPerProject/cpQuizInfoTotalUnansweredQuestions: again, the numbers will be the sum for Pretest and Test. And the values shown on the score slide are for the Test only. System variables to create a custom score slide are not available, whether you want one for the Pretest or for the Test.

  3.  cpQuizInfoTotalCorrectAnswers: happy to tell you that here only the Test questions are counted, not the Pretest questions. However, if you have activated partial scoring, you have to know that a question is counted correct always when at least part of the question is correct. Depending on the settings, this can mean that a question is considered correct even if it has a negative result (example: many answers, one correct, lot of penalties for all the incorrect answers). That seems a bit weird.

Link

The PDF is no longer available, please download the table with system variables in CP8, link is in the top of this post. There are indications about changes with former versions.

Reset Effects in Captivate 6

Intro

For a recent webinar about conditional advanced actions I recreated a file in Captivate 6 to check a Sequence of clicks, as described in the article. You can play with this file in the Example section. In this version I used a lot of custom motion path effects to put the cards on a stack. If the sequence is not correct, there is a reset button to offer the user a new attempt. And that meant that the motion effects had to be reset. I was very happy to find an easy way for this work flow, and that is the goal of this article.

Example

Play with this movie that has only 4 slides: on the first slide you choose between two ways of playing and will be navigated to either the second or third slide depending on the choice. On slides 2 and 3 in case of wrong answer you can reset the cards to their original position, on slide 2 this will happen with the Next button, after you checked the sequence with the Question Mark button. On slide 3 you have a reset button? Last slide will only be reached in case of a correct answer. Want to cheat? The sequence is 57142

Work flow

The work flow is pretty simple: you have to return to the very first slide, and using an advanced action on entering that first slide, redirect again to the slide just left. And the objects that had moved will be back in their original place, the effect is reset. I tried out different other work flows like navigating to the previous slide, but for some reasons it only is functional if you return to the very first slide. In the example movie, the On Enter action for that first slide is a bit more complicated because I have some more actions to be done, but in the next example I keep it really simple, just having the focus on resetting the effects.

Second example with details

Description

This example has 5 slides: Intro, TimeBased, ButtonTrigger, AATrigger and Summary. On slides 2,3,4 you'll find an effect applied to one object, first time-based, then triggered by a button and at last one triggered by an advanced action attached to another button. On slides 2 and 4 other objects with effects will appear, which was not possible for the slide with the button that triggers an Effect, because you can only apply one effect that way.

Shape buttons

I used default buttons from the Shape Button category, but changed the triggered actions. On the Intro slide there is only a Next button (used a rollover shape as tooltip). On slide 2 you'll find 3 buttons, timed for the rest of the project (and hidden on the last slide Summary). Each of them has a tooltip as well, and they all have a pausing point near the end of the slide, but play button pauses a little bit before the others:

Reset button: the default action for this button is 'StartSlide', and this is what I wanted it to do.

Play button: has a different functionality, depending on the slides

  • on slide 2 (TimeBased), slide is paused on entering, and this Play button will just release that pause by the statement 'Assign cpCmndResume with 1'. The playhead will continue, and the three objects that start on different moments will get visible with their effect.
  • on slide 3 (ButtonTrigger): no need to pause on entering, I covered the original play button with a transparent shape button that triggered the Effect on the hexagon by a simple action, thus limited to one object with effect.
  • on slide 4 (AATrigger): no need to pause on entering; again I covered the original play button  with a transparent shape button that triggered an Advanced action NewApply with two statements: "Apply Effect..." and "Continue". This button pauses at exactly 1secs, whereas the other objects appear after that time (see timeline). The Continue statement is needed to release the play head so that the other objects appear with their effect.

Advanced Action EnterIntro

This action, triggered by the On Enter event for the first slide (Intro), has to be conditional. It has to check if this slide is visited for the first time. To achieve this I created a user variable v_visited (no default value, so empty to start with) that will be set to 1 when the slide is visited for the first time. On all following visits, the user is navigated back to the last visited slide, the slide on which he clicked the Reset button. And that makes the magic happen: the object that was moved by the applied effect is back in its original location. The conditional action is rather simple:

IF v_visited is equal to 1

THEN Go to Last Visited Slide

ELSE Assign v_visited with 1

When returning to the last visited slide, all objects will be in their original place. Even if you have clicked twice the Play button! Try it out with the example movie. You'll see a different behaviour depending on the slides:

  1. On Slide 2 (TimeBased): pressing the Play button a second time will not have any effect, since the play head has stopped at the pausing point of the Next/Reset button and all effects have been played.
  2. On Slide 3 (ButtonTrigger): pressing the Play button another time will replay the Effect, since it is triggered by that button. But motion effects are always relative to the present position of the object. So.... the hexagon will move outside of the stage. 
  3. On Slide 4 (AATrigger): if you press the Play button again, the hexagon will move again (outside of the stage), but not the other objects. Their effects were time-based and the play head is at a position after those effects. If I had applied the effect to those objects by the Advanced action as well, they would have played. But then it was not possible to start the effects at different times.

Toggle Shape buttons - Captivate 6

 DevLearn 2012: Info

Intro

One of the well visited articles on this blog is Toggle button in which I explained how to create a custom button to change the state of the playbar, CC, audio from On to Off and vice versa. I explained there as well how to use the same Expression with a boolean user variable instead of one of the available boolean system variables.

In versions before Captivate 6 it was necessary to have such a button on each slide, cumbersome, even if they had always the same advanced actions attached to them so that Copy/Paste would do the trick. But now we have .... shape buttons that can be used both on Master slides or timed for the rest of the project as I explained in 'Why I like Shape buttons'.  This article had some simple use cases and I promised to show the scenario for a real toggle button. This is the subject of the present post, explaining how to create a toggle button to turn off/on Audio. There will be a companion video on YouTube showing the work flow. I'll offer you different scenarios, starting with a very simple one, and ending with a button that really shows the state of the Audio.

Scenario 1:  Shape Button with simple action

In the Shape category Buttons, you'll find a Mute button. It is already configured as a button, but without pausing and has a simple action attached to it:
Assign cpCmndMute with 1 

You can put this button on the main master slide, so that it shows up on each slide of your project, or you can put it on the first slide of the project and time it for the rest of the project.

If course this is not a toggle at all, it only allows to mute audio. And the user will hear, but not see the 'status' of the audio. Personally I think the icon on the button is misleading, because it seems more to point to 'play audio' instead of 'mute audio'.

The easiest way to change this shape button into a real toggle that can mute/unmute the audio is to change the Assign action into:

Assign cpCmndMute with 1 - cpCmndMute

This works fine, but from my recent article Why Choose Standard over Simple Action you know that if the shape button is paused, clicking on it to mute/unmute audio will also release the play button. And of course, the button will always look the same, will not show its status.

 

Scenario 2: Shape Button with standard action

You get it: change the simple action to a standard action, and the play head will not be released. To have it on each slide, you can again choose either to put it on master slides or to time it for the rest of the project on the first slide.

But still you are always looking at the same icon on the button, no difference between mute/unmute. Up to the third scenario:

 

Scenario 3: Shape Button with conditional action

You need two items to show the change of state. In my example I used a line shape, not functional as button, that would cover the original audio button in unmuted state:

The idea is to show/hide the line shape depending on the current state of the audio. The conditional action has to be able to address the ID of that line shape. Since objects on master slide do not have an ID, they cannot be addressed by an advanced action. That leaves me with two possibilities:

  1. Putting the audio button shape (from the Smart shape category Buttons) on the main master slide, and the line shape on the first slide, timed for the rest of the project.
  2. Putting both the the button and the line shape on the first slide, timed for the rest of the project. Both get an ID in that case, and I'm even able to group them.

Because of the low priority of objects timed for the rest of the project (as I explained in the blog post about Shape buttons), it is necessary to check 'Place Object on Top' for shapes that are timed tha way. It is up to you if you want pausing, hand cursor... Here is a screenshot of Timing and Options for the button shape. For the Line shape I only have the option 'Place Object on Top' checked and on the Timeline the line is above the button, not to be covered up by the fill of the button of course.

Conditional action

This action has 2 decisions:

  • Always is a mimicked standard action, that toggles the value of cpCmndMute the same way as in the standard action of Scenario 2
  • CheckAudio checks the value of  cpCmndMute, if it is 1 it will show the shape line, if not it will hide it.

 

Scenario 4: switch Shape buttons !!!

Yes, indeed, this was a very exciting discovery: you cannot have two regular button in the same location on a slide, even when you hide/show them alternatively. I explained this in the first article about Toggle button. But Shape buttons are different: you can have two of them in exactly the same place and this will now allow you to do the real stuff: a totally different shape to Mute and to Unmute audio. I really hope that all the users I had to tell that this was not possible before, will read this article. 

Watch this one slide movie, click the Stop button (shape filled with an image), it will switch to the Play button.

Both shape buttons trigger a standard advanced action, StopAudio, PlayAudio. SInce the audio plays on the slide when the movie starts, the Play button is initially set to invisible. And since both are shape buttons, you can put them on the first slide and time for the rest of the project to have the toggle available on all your slides. Like with scenario 3 putting on the master slide is not an option because the shapes need an ID to be used in the actions.

Conclusion

What I explained for an Audio toggle can of course be applied to all your toggle buttons: turning on/off CC, Playbar, opening/closing a TOC in overlay (with the new cpCmndTOCVisible variable), Play/Pause (video tutorial will be posted on YouTube), etc.

Captivate 6 - Advanced Actions

Intro

If you did read some of my posts, you'll know that I focus often on using Advanced actions in Captivate to extend its functionalities. And if you look at the just released version 6, like me, at first sight you will be disappointed because apparently nothing much has changed about Advanced actions: no enhancements in the user interface, only two possible new statements (play and stop an audio clip), still not possible to export/import/print/comment those advanced actions, etc. To re-use them you'll have to create a template, and here is a first positive note: it is now possible to save an existing cptx-file as a template.

Same as with the release of Captivate 5.5 I'll leave it to the Evangelists and other Captivate friends to talk about the big new features like new video demo, interactions, shapes, quiz enhancements, themes, shapes etc. Those more visible features, even though they are exciting, have never been targeted by this blog and I'm a focussed person. Hoping to find time to publish more in the near future, planning to use the new video feature to publish some YouTube videos about.... advanced actions. Let me know if you find that useful?

Favourites

On this release day, I want to tell you how two new features (my first favs) will save you a lot of time when scripting advanced actions:
  • object grouping
  • shapes used as buttons
For this purpose I recreated in CP6 a Game, explained in a previous post: Concentration Game. Can you have a look there and play the game if you do not remember about it? The CP6 version is a bit simplified, has less cards and only one image to discover. But the differences due to those new features will be very clear.

Later on, after having explored more in the released version (for the moment I'm still using an prerelease version) I will try to publish a list with my likes and dislikes, in the same sense as this one: What I (dis)like in Captivate 5.5.

Shape buttons

In the original game, each part of the image was covered up with three objects:
  1. a mnemonic-image to be disclosed on click, set for the rest of the project so that it has only one ID
  2. another image with the back of the card, visible before the mnemonic is disclosed, set for the rest of the project for the same reason
  3. a click box to trigger an advanced action:  this cannot be set for the rest of the project
In Captivate 6 I replaced the objects 2 and 3 by one Shape button. Contrary to other interactive objects, a shape button can be set for the rest of the project, to preserve its unique ID. Since now only two instead of three objects have to be addressed, advanced actions will be shorter.

Object Grouping

Long awaited feature: being able to group objects on the Timeline, to label the groups, to collapse/expand them, to make them visible/invisible on the stage for editing reasons. Less known: you can use the group label in advanced actions as well, to execute a statement on all the objects of the group. That is great for show/hide or for enable/disable actions. In the new game I choose to create a group with all the Mnenomics, and another group with the Shape buttons. When entering the last slide (Congratulations) all those objects have to be hidden. In Captivate 5.5 this resulted in a long list with Hide statements, 3 for each card (since I had three objects per card). In Captivate 6 you only need two statements: one for each group, whatever the number of objects in that group. That is really a great time saver.

Video

Do not judge me too harsh, this is my first try at the new video demo feature, have still a lot to learn by practice. If the video doesn't show up on your page, please watch it on YouTube: Advanced actions Captivate 6.
Watch the differences between the two games, and how both the shape buttons and the object grouping made the scripting easier in Captivate 6. Be sure, will blog more about actions triggered by Shape buttons! They cannot only be displayed for the rest of the project, but also be added to master slides and question slides. This opens new possibilities.