Toggle Shape buttons - Captivate 6

 DevLearn 2012: Info

Update: if you are using a more recent version, have a look at this article

1 Shared Action = 5 Toggle Shape buttons

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.

Why I like Shape Buttons - Captivate 6!

Intro

In my first blog post  and video about the recently released Captivate 6 I mentioned that my favourite feature is not Themes (certainly not :-)), nor HD Video, nor HTML5 publishing, nor Quiz enhancements, nor Actors/interactions but the new Shapes! Beware: I do not love them because of the design of the default shapes (why not enable adding custom shapes, or inserting SVG-images), not because of the editing possibilities (too limited, lacking tools for editing Bezier curves like pen),  little bit because they are vector-based, but really because they double both as Text containers and as BUTTONS

Today I want to show you why Shape buttons are for me the feature that will save me a lot of time.

 

Difference between buttons and Shape buttons

Both regular buttons and Shape buttons have the same list of possible actions (on Success/After Last attempt), including the possibility to execute an Advanced action or Javascript. 

Creating a custom shape button is easier than creating a normal button: you can use one of the default shapes, convert it to a freeform shape and edit to your wish. You can fill it not only with a solid color, but also with gradients, with textures or with an image. 

The real value of a Shape button over another button (or click box) is:

  1. You can use a shape button on a Master slide, even on the Main master slide, which is not possible for any other interactive object, not even for the Rollover slidelet (kind of hybrid between non-interactive and interactive). This is a timesaver, because it allows to put custom buttons that have to appear on all slides on the main master slide, or if you want different sets of buttons, put them on normal master slides.
    Drawback: the shape button on the master slides will not have an ID (label), so it cannot be addressed by an (advanced) action. I logged a feature request to have this ability in future versions. Another drawback is that for buttons on the Main Master slide, you do not have an option 'Master slide objects on top', so you have to be careful that the button is not covered up in the normal slides.
  2. You can put it on the first slide of a project and set its Timing for the rest of the project. That is an alternative for buttons that you want to see on all slides. Moreover the shape button will have an ID in this case, which means that it can be addressed by an (advanced) action, like being hidden on certain slides.
    Drawback: an issue that I already discussed in this article 'Stack order and Master slides' is that the button will normally be at the bottom of the stack on slides where it is not really present (from the second slide on in this case). It will be even under the master slide objects, and unchecking 'Master slide objects on top' doesn't help. It is possible however to check the option 'Place object on top' when timing for the rest of the project.

Here are some negative points:

A normal button has three states: Up, Over and Down to show user's activity, the Shape buttons are more limited: when pressed the image will shrink a little bit. For small shapes this is not that visible. 

Contrary to normal buttons, a shape button cannot have a score attached to it, nor report to a LMS. They will show up in the Advanced Interaction view (F9). 

Shape Buttons on Master slide - setup

After checking the option 'Use as button' in the properties panel, you can choose to have a Hint caption (no Success/Failure captions possible), to show the hand cursor, have a double click and opt for a click sound. All those are to be found in the Options accordion. 

Do not look for a Timing accordion, there is none because the Master slides have no fixed duration, they'll adapt to the slides that do use the master slide. And objects on the master slides will always be shown for the duration of the slide. But you have the possibility to have a pause for the shape button, also to be found in the Options accordion. Timing of that pause will always be at the end of the slide (like for click boxes).

As I mentioned before no label cannot be attributed to smart shapes on a master slide. They all show up the same way on the Timeline panel as you can see in the screenshot.

Use Cases

Shape buttons on Master slides are great if you want to have them on all slides (Main Master slides) or on a lot of slides (normal master slides) and you do not need the ability to change them on individual slides. Some examples:

  • A Next/Back button as you did see an example in previous screenshot. For this Next button I used the simple action 'Go to Next Slide'. The shape is a rectangle, filled with an imported image.
  • Toggle buttons to show/hide Playbar or Closed Captions. I use a standard advanced action, not a simple action so that the play head is not released (see recent video about simple vs standard action)

Shape Buttons Timed for rest of Project - setup

Such a shape button, on a normal slide, can be labeled as you can see in the screenshot below.

Check the same option 'Use as button', and in the Options panel you'll find besides the Hint, now also Success/Failure captions. You'll miss the Pause option here, because it has been transferred to the Timing accordion that is now available, just like for normal buttons.  You can time the pause, but be careful: this setting will apply to every slide, and is not dependent on the slide duration, so do not pause too early. You can delay the timeline for the button, which is not possible for shape buttons on a master slide. In the screenshot the shape button, timed for the rest of the project, will show on each slide after 1 second and pause after 2 seconds. 

I checked the option Place Object on top, to avoid that the shape button could be covered by another object on the slide or on a master slide. This is not always necessary, but you have to be aware of the shape button being at the bottom of the stack if you do not check this option.

Use Cases

Shape buttons timed for rest of project allow you to time the pausing point or the duration of its timeline on each slide but they are really better suited than shape buttons on master slides if you want to hide/show them on some slides without having to create another master slide. And they are also great if you want to simulate a changing button to indicate the state when toggling. Here are a couple of examples:

  • Next button has no sense on the last slide; with a timed for rest of project button this is easily solved by hiding the shape button on entering that last slide
  • Audio toggle or Play/Pause button, showing the state: this will be the subject of my next video... will keep you informed

Buttons Category

In the Smart shape flyout panel you'll see a category 'Buttons'. Have a look at them, most have a simple action attached to them (Go to Last Visited slide, Open URL/File), but some trigger an Advanced action. And personally I hope that we soon will be able not only to create and save custom shapes in that panel, but also to edit/create the advanced actions attached to them.

Some examples of (advanced) actions for the buttons category:

  1. Mute: is a simple action triggered by the audio button 'Assign cpCmndMute with 1'. Be careful, since it is a simple action, clicking on the button will release the playhead. You can convert it to a toggle by replacing the current action by 'Assign cpCmndMute with 1-cpCmndMute' but the issue with releasing the playhead will remain, and the button will not reflect the state (muted or not). I will explain in a video how to create a real toggle button for audio with changing states.
  2. startSlide: triggered by both the Start and Home button is an advanced action:
    The first statement navigates to the first slide. Wondering about the strange expression? It is linked with the fact that slide numbers start with 0, so to navigate to slide 1 in the filmstrip you need number 0. The second statement releases the play head, will try to explain in a future blog post the changes to the advanced actions for pausing/releasing.
  3. lastSlide: similar to the startSlide action:

Conclusion

I hope you understand why I like the shape buttons that much. And I will try to post more about them: tips to change the advanced actions, how to create changing states for toggle buttons etc. Let me know if you have other suggestions, please, post in a comment.

Graded Survey?

Intro

Another user asked for a solution to this problem, quoting:

" I'm creating a test where the students grade themselves between 1 and 5 on what they think their ability is for each category.. eg Public Speaking (1,2,3,4 or 5)

There is ten categories. But for each category, the answer they give needs to be multiplied by a certain number, which correlates to the importance of that skill in negotiating. eg

Public Speaking is important = ( number * 5 )

Maintaining Control Over Body Language is LESS important = ( number * 3 )

Questioning is the LEAST important = ( number * 1)

Initially she tried using the Likert question, but it has never a score. So I worked out another scenario

Example

Take the test: one subject only 'Will I be a good teacher'? The percentage at the end should reflect the grade of ability based on your estimations. 



My scenario

I used Multiple Choice Questions as Survey questions. And for once I appreciated the fact that Captivate makes no difference between text and numbers. This was a pleasant and useful discovery: if you use numbers instead of characters for the answers, the value of the system variable cpQuizInfoLastAnswerChoice will be an number and... you can use this number in calculations using advanced actions.This made the solution easy, was glad that my Captivate intuition was correct. I tried to make the solution as simple as possible, because the user was kind of a newbie to advanced actions. Each category will be one Multiple choice question, with the choice of numbers for the Numbering option. All questions have the same possibile answers corresponding with the five grades of ability: 

  1. Very Poor,
  2. Poor
  3. Good
  4. Normal
  5. Excellent

When the user clicks the Submit button, the chosen answer number will be stored in the sysem variable cpQuizInfoAnswerChoice. This value changes after each answer and will be used to calculate the score for the subject.

Variables

I created some user variables:

  • v_subject: will store the subject for this list of questions, will be populated in the title slide for the subject; I inserted a text caption on the MCQ master slide  above the Progress indicator to show the subject on each question slide. This variable will get its value by a simple action (Assign) On Enter of the Title slide.
  • v_teacher: stores the cumulated score based on the estimated ability grades and the weight factor (depending on importance) for each category; this value will be calculated by an advanced action triggered by the Submit button. If there is no reason to keep this absolute score, the variable could be reused for another subject, and perhaps then you could better label it v_score.
  • v_maxTeach: will be used to store the maximum score that could be obtained if the maximum ability was indicated everywhere. Of course it could be replaced by a literal value, and in the example this was 100. But I thought it would be more versatile to calculate this maximum score, to avoid dreaded maths...and the calculations are done in the same advanced action triggered by the Submit button.
  • v_percTeach: will store the percentage for this subject, calculated from the variables v_teacher and v_maxTeach by an advanced action triggered on entering the 'score' slide.
  • v_multi: the weight factor for a category, will be populated by a simple action on entering each question (category) slide.
  • v_dummy: a variable necessary to compensate for the limited mathematical functionalities in Captivate, used only for calculations

Events - actions

On Enter Title slide: Simple action Assign v_subject with XXXX    (name of the subject)

On Enter Question slide (for each): Simple action Assign v_multi with .... (weight factor, number)

On Enter Score slide: Advanced action TeachCalcEnd

For each Submit button same Advanced action TeacherCalc


Advanced Actions

TeacherCalc

This action is triggered by Submit buttons

The variable v_dummy is first used to store the weight of the grade by multiplying v_multi with the chosen answer number (1-5); then the total score v_teacher is incremented with the result.

The same variable is used a second time to calculate the maximum possible score for this category by multiplying v_multi with 5 (maximum ability); and this is used to increment the maximum total score v_maxTeach.

I added the statement 'Go to Next Slide' so that the user doesn't have to wait for the playhead to reach the end of the question slide.


TeachCalcEnd:

Action, triggered on entering the last slide, which shows the percentage.

Rather simple maths to calculate the percentage from v_teacher and v_maxTeach and store it in the variable v_percTeach.

Some Timesaving tips

Start by creating the user variables, and then add the Text Caption with v_subject to the MCQ Master slide.

Create the title slide, with its On Enter action (assigning a value to v_subject), and duplicate it then for the other subjects. That way you have only to change the value With for the On Enter action and edit the text captions.

Insert only one MCQ slide after the title slide. Edit its text captions, add the simple action On Enter, create the advanced action TeacherCalc to be triggered by the submit button. I unchecked also dragged the Next button under the Clear button but since there is no Review, it could also have been unchecked.

Now duplicate the MCQ-slide 9 times: this will avoid to re-edit the answers, to relocate the buttons, to re-assign the simple action On Enter and the advanced action for the Submit button. Do not forget to edit the With field for the Simple action On Enter that will populate v_multi.

For the question slides in the other objects, you will have to duplicate the advanced actions if you use new variables to store the score (v_teacher), maximum score (v_maxTeach) and percentage (v_percTeach). The variables v_subject, v_dummy are reusable.

Why choose Standard over Simple action?

Intro

Users of Captivate 9 or later! 

You no longer need to use the work flow in this blog post, because this version 9 provides a new check box for Simple actions: if you uncheck 'Continue Playing the Project' the playhead will not be released.

Several times I answered the question: why should I create a standard advanced action to do something that is also possible with a simple action? This is one of the questions I treated in my first webinar (10th of May 2012) about Advanced actions: difference between simple, standard and conditional advanced actions. You can watch the recorded webinar On Demand using the link in the article:

http://blogs.adobe.com/captivate/2012/04/training-power-of-advanced-actions-in-adobe-captivate-tips-and-tricks.html

For the demonstrations in that webinar I used Captivate 5.5. Meanwhile I offered another webinar about conditional actions (5th of July) but I think the recording is not yet available. That one was using Captivate 6. However what I explain in this article is valid for versions 5, 5.5 and 6.0.

 

Difference Simple/Standard

What do I mean by a 'simple' action, because that is not an official term in Captivate? It is an action defined in the Actions accordion of the Properties panel, either for a slide or for an interactive object, the place where you find the possible events (On Enter/Exit for slides, Success/Failure for objects). Such an action is limited to one statement.

A Standard advanced action can be triggered by the same events but will be defined in the Advanced Actions Dialog box. And you can create such an action with only one statement, seems strange because it takes more time,... but there is a very good reason!

This is not a public secret, but a lot of users are not aware of the fact that even if you have exactly the same statement in both, the behavior is different! In the example of the screenshots both actions are triggered by a button (On Success):

  • When clicking a button that triggers a simple action, not only will the statement be executed but the playhead will be released. This means that it will continue and if you have nothing else to stop the playhead on the slide, it will advance at the end of the slide to the next slide.
  • When clicking  a button that triggers an advanced standard action, only the statement will be done but the playhead is NOT released!

 

Video

I uploaded a video about this difference to my YouTube channel. It is not possible (too big) to embed the video here, this is only the poster. The link to the video is:

Simple versus Standard Advanced Action in Adobe Captivate

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.

Quiz and Frustration?

Intro

Bit puzzled by the title, and perhaps baffled by the fact that I produce a second article this week :-)

In this thread on the user forum, I got another challenge, quote: " If I have an assessment simulation with questions and a learner must attain 80%, is it possible to set up something that stops the assessment if the learner has no chance of passing? " Normally the user wants to navigate the learner outside of the assessment to review the course. In this post I will only explain the setup to get the user immediately to the score slide, when it gets impossible for him to reach the passing score. The action in this case is to advice to Retake the Quiz, but of course it would also be possible to navigate the user to other slides, as long as they are inside the quiz scope. The concept of quiz scope I explained already several times, and showed yesterday in another article.

Example

I tried to work out an example with simple Question slides that would be valid in most circumstances: total score is not fixed, number of questions is free, score/question can be different. In this screenshot of the Advanced Interactions Panel you see that I have 6 question slides, all with a different score and the total score is 25points. Quiz settings require at least 20 points (80%) to pass. Play with this quiz please. You have 3 possible attempts on Quiz Level. Review is not available (is possible, but in this case would have complicated the advanced actions and wanted to provide a 'simple' solution).


Slides - events - objects

On the score slide, an initially invisible polygon with text Message has been added that will pop up if the user is taken to this score slide without having been able to finish all the questions. 
In this work flow I only use On Enter slide events:
  • Slide Quest1 (first question slide) triggers an initializing standard advanced action EnterOne
  • Slides Quest2-Quest6 trigger the same conditional advanced action EnterSlide
  • Slide Score triggers a conditional advanced action EnterScore

Variables

Some Quizzing system variables are important, and beware: this scenario is only possible for Captivate 5.5 because in that version those variables are updated after each Question submit. It is also possible with 5.0 but bit more cumbersome. Let me know if you want me to explain

  • cpQuizInfoTotalQuizPoints   stores the maximum possible score (25points in example) - fixed value in CP5/5.5 and same as cpQuizInfoTotalProjectPoints
  • cpQuizInfoPointsPerQuestionSlide stores the score attributed to the present question, will get its value when the question slide gets to its first frame, but has still the value of the previous question during the On Enter event
  • cpQuizInfoPointsscored  stores the result obtained by the trainee, will get its value in CP5.5 after the Submit action on a Question slide, so still has the value of the previous question when entering a question slide; but in CP5.0 this variable is not updated after each question! Workaround there is to add the score of cpQuizInfoLastSlidePointScored to a user variable to calculate the present score after each question.
  • cpQuizInfoQuizPassPoints the number of points specified to pass the quiz
I created three user variables to do some calculations:
  • v_MaxUntil: will get the maximum score that could have been acquired if the user had answered correctly every question up till now
  • v_MaxRemain: will store the maximum score that can be acquired with the remaining questions; sum of v_MaxUntil and v_MaxRemain will be equal to the total score cpQuizInfoTotalQuizPoints
  • v_Rest (sorry for the Dutch): maximum score that user could have if he answers every future question correctly, this will be compared with pass score

Advanced actions

EnterOne triggered on entering the first question slide

This is an uncomplicated standard advanced action that will reset the 3 user variables:


EnterSlide triggered on entering all question slides except the first

This conditional action has two decisions:
Maths: is a mimicked standard action (condition is always correct, so the THEN statements will always be executed) 
  • increments v_MaxUntil with the maximum score that was attributed to the previous quesiton,  cpQuizInfoPointsPerQuestionSlide 
  • calculates from v_MaxUntil and cpQuizInfoTotalQuizPoints the value to be stored in v_MaxRemain
  • calculates v_Rest by adding v_MaxRemain to the points already acquired, stored in  cpQuizInfoPointsscored  

CheckBranch: checks if the trainee is still able to get a passing score by comparing v_Rest to the system variable cpQuizInfoQuizPassPoints. If pass is no longer possible there is an immediate jump to the score slide. Both for THEN and ELSE there is a Continue statement (only statement for ELSE).

Note: perhaps you are wondering why I do not execute something similar after the last question? Reason is that, even if the user fails to pass by answering incorrectly the last question, he will always get to the score slide and see the Message. 

EnterScore triggered on entering the score slide

This conditional action has only one decision, same as the second decision for EnterSlide. If the user was navigated to this slide or didn't pass (in case of answering all questions) the special Message will pop up.

Conclusion

This scenario, with the advanced actions that are versatile, can be used whatever the number of questions or the values of the individual scores/total score/passing score is well suited to be stored in a template. Just a suggestion :-)





Audio Objects: Control them!

Intro

Last year I published Playtime with Audio ... where I introduced the term 'Audio objects'. This is audio attached to an object that is invisible to the user, has no other functionality than offering the possibility to control the audio by hiding or showing the 'invisible' object using (advanced) actions. Since that blog post I got several questions about controlling the audio objects. In the example you will view here, I focus on audio objects for question slides. And some other tweaking occurred as well, that I will perhaps explain in a later post. Here we go

Example

View this movie and watch/listen carefully. You'll see two question slides, both Multiple Choice Questions. The first, with radio buttons, has only one correct answer and I used the Advanced Answer options to give feedback and to branch to more information about the answers. The second question has multiple correct answers, so Advanced Answer options are not possible there. Both question slides have an audio object (same for both to keep filesize restricted), that will play only on first visit of the slide. From the first question slide you will be navigated to another slide and then returned to the second question slide. The second question slide has the same audio object, but when submitting an answer, you'll get audio feedback and the audio on entering is stopped even if it is not yet finished playing.

Audio Object

For the invisible object to which the audio is attached I will mostly use a Highlight box with a dedicated style 'AudioObject', that I cloned from the original Highlight style. Because I created that style before opening any project, it is available in all my projects. When planning to use a lot of audio objects I will even set it as the default Highlight style. Why do I choose for Highlight box? First of all, because it has a style, which is not the case for any drawing object (which otherwise would be my choice). Secondly to make it invisible just set the Alpha for the Fill to 0 and the Stroke Width to 0 as well. 

Work flows to control Audio Objects

Play only first time

On entering the question slides, I trigger a conditional advanced action EnterOne/EnterTwo that uses a created user variable, one for each question slide: v_one, v_two.
This variable will be incremented and then checked. The first time the user enters the slide, it will be 1 and the audio object will play because it is set to visible. All subsequent entries will result in a value greater than 1 and the conditional action will hide the audio object, which means that it will not play. Here is the description of the conditional action:
  • First decision Increment is a mimicked standard action to increment the user variable. Here is a screenshot from EnterOne.

     
  • Second decision CheckEntry checks if the value of v_one (v_two for the second question slide) is greater than 1; if that is the case, the audio object AuEnter1 is hidden and Continue is added to avoid blocking the playhead, if not only Continue is needed in the Else portion. Screenshot from EnterOne:


The action EnterTwo is similar to EnterOne, you only have to switch the variable from v_one to v_two and the audio object from AuEnter1 to AuEnter2 (because I labeled those objects that way).

The advantage of having all actions executed on entering this question slide is that it doesn't matter from where the user is navigated to this slide. In this use case it is important, because the first question slide can navigate to five possible slides. If you added the condition to an interactive object on those slide, you'd need to have 5 different actions, and another one for the Retake/Review navigation from the score slide.

Stop audio when other audio starts

If you listened carefully to the movie and quickly entered an answer on the second question slide (about eLearning Suite), you will have noticed that the audio object that was played on entering the slide (if first time) is cut to be able to listen to the feedback audio. This is bit more complicated, because I had to tweak the functionalities of the question slide. This was my work flow:
  1. Kept only the Incomplete Text Caption, but delete the Correct and Incorrect Text Captions
  2. Unchecked the Back button but allowed Backward Movement in the Quiz Preferences (see later)
  3. Created two Text Captions: TCWrong and TCCorrect that have audio attached to them but are set to Invisible (uncheck Visibility in Properties panel)
  4. Created a Success2 and Failure3 advanced action to be triggered on Success or on Failure (allowed only one attempt on Question level)
Here is a screenshot of the Properties panel of that Question slide:

Success2/Failure2 are similar standard Advanced actions that do hide the audio object AuEnter2 (playing first time when entering slide), show the appropriate Text Caption and the inevitable Continue statements.

Be careful: the playhead on this question slide will stop at the pausing point of the question slide. In this screenshot of the Timeline this is at 1.5 seconds. In order to 'hear' the audio attached to the Captions TCCorrect/TCWrong you have to move the start of their timeline close to that pausing point. I do not pause the slide, the playhead once released by the Submit button will get on and on reaching the end of the slide continue to the next slide (Score). So I had to extend the duration of the Caption timelines to be as long as the longest audioclip attached to them. 

Other tweaks

As told in the Intro, I will not explain the other tweaks that I have mostly treated in other blog posts like Question Question Slides. Here is a short list:
  • Changed the Skip button to Next, and dragged it under the Clear button
  • Extended the Quiz scope to be able to navigate to the explanation slides (that are before the question & score slide) by adding a scored object (Next button) on first Intro slide (not to include in Quiz total)
  • Because Retake/Review will navigate to the Intro slide, I created a EnterIntro conditional advanced action (similar to the other Enter actions) that navigates immediately to the first Question slide if the user visits this Intro slide not for the first time
  • The Next buttons on the slide do not always navigate to the real next slide, but are used for branching when necessary.
  • To explain difference between Click box and Button I used 3 slides, and the possibility to show the Timeline for more than one slide
If you have more questions about those tweaks, or suspect that my list is not complete, please feel free to post a comment.


Sequence Check

Update

New version of this workflow, with example output to HTML5 and using new features can be found in this post:

Sequence Check slides (updated)

Intro

Another challenge on the user forum, http://forums.adobe.com/message/4387510#4387510:  "wonder if it is possible to have 5 click boxes on a slide that must be clicked in a specific order before the slide will advance?" Had to ask for some more details. There are no extra (wrong) click boxes on the slide, the check for a correct sequence could be done by using a Check button, and the Next button should appear on the slide only when the sequence of clicks is correct. The user wanted to have the possibility to check after 5 clicks or to have an 'intermediate' check after each click. I thought it also to be a good practice to disable a click box immediately after it has been clicked, since a double click on the same click box was not wanted. 
 

Example

Play with this SWF. You'll find two similar slides after the introduction slide. 
  1. On slide First the Check button will appear after having clicked on the 5 click boxes in the sequence you wanted. You can watch the number of clicks in a Text caption at the bottom. Once a click box is clicked it will be disabled. If your sequence is not correct, all will be reset and you can try again.
  2. On slide Second you'll have the Check button from the start and you can use it at any time. If the check results in at least one wrong click, you'll get a Reset button. After the last click, if the sequence was correct the Next button will appear.

Slides, objects, labels and events

Slide First: 

  • 5 click boxes (that cover up rectangle shapes). I labeled those click boxes in the sequence they should be clicked: first CB_1, then CB_2 etc; each click box will trigger an advanced action with the same label. That is only possible because the click boxes were labeled before the actions.
  • Buttons: BtCheck1 that will trigger the advanced action SeqCheck and button BtNext1 that has the action Go to Next Slide; both are initially invisible
  • Text Captions TCNumber (shows the number of clicks), that is visible and set to show for the rest of the project (also needed on slide Second)
  • Text Captions TC_Wrong/TC_OK1 that are initially invisible and used for feedback in the action SeqCheck

Slide Second

Because variables have to be reset, the On Enter event of this slide is used to trigger the Advanced action Enter2.
Almost identical to the first slide. Because the click boxes do get another ID, but trigger the same advanced actions CB1... for once I didn't even label them :-). The Text Caption TCNumber is still visible on this slide, because it was timed for rest of project. Other objects are:
  • Buttons: BtCheck2 (visible) that will trigger the advanced action SeqBis and button BtNext2 (invisible) that has the action Go to Next Slide
  • Button BtReset (initially invisible) that triggers the advanced action BtReset (same label possible because button got it first)
  • Text Captions TC_Some/TC_OKUntil/TC_OK2 that are initially invisible and used for feedback in the action SeqBis
 

Variables/logic

Only two user variables were created to be used for checking the sequence:
  1. v_counter: will count the number of clicks (correct or incorrect); this user variables is visible in the text caption TCNumber. For that reason I gave it a default value of 0, so that it will also show a value in the text caption when no click has occurred.
  2. v_correct: will be incremented when a click has been in the correct sequence. 
The first variable will be used twice in my logic:
  1. to check if the click sequence is correct, for the click box CB_1 that should be clicked first I check "v_counter = 1?", for CB_3 it will be  "v_counter = 3?' etc and increment v_correct if that is the case
  2. to check if until now the sequence was OK, which will be the case as long as v_correct is identical to v_counter

Advanced actions

CB_1, CB_2.... CB_5 

Those are  triggered by the click boxes with the same name on first slide, and also on second slide; similar conditional actions with 3 decisions:
  • Count is a mimicked Standard action, disables the click box, increments the variable v_counter and hides caption TC_Wrong if it has been made visible in a previous sequence.

  • Check as explained before will test if v_counter = n where n=number of the click box; if this is true, the var v_correct will be incremented; no Else action is needed.
     
  • ShowBtCheck  checks if  v_counter = 5 and if that is the case the button BtCheck1 will be made visible

     

SeqCheck

is  triggered by the button BtCheck1 is a conditional action with 1 decision Sequence
It checks if the variables v_counter and v_correct have the same value, which means that the sequence was totally correct. In that case the correct feedback caption TC_OK1 is made visible and the Next button.
 
If the condition is not fulfilled the other feedback caption TC_Wrong gets visible and everything is reset so that the user can try again:

  • v_counter and v_correct are reset to 0
  • button BtCheck1 is hidden again
  • all click boxes are enabled 

 
Enter2

is triggered on entering slide Second
This is a simple standard action, resetting the variables by assigning the value 0 to them.

SeqBis

is triggered by the button BtCheck2 is a conditional action with 2 decisions:

CheckUntil valid for intermediary checks, before all click boxes are clicked, will show the correct feedback caption (TC_Some, TC_OKUntil) and show the Reset button if the sequence is incorrect so far; this is a decision with an THEN/ELSE branching

End only will show the BtNext2 when all click boxes have been clicked and the sequence was correct.



BtReset

is triggered by the button with the same name on slide Second is a standard action that:
  • v_counter and v_correct are reset to 0
  • all click boxes are enabled 
  • Reset button is made invisible

Conclusion

In this example I really appreciated the duplicate and copy/paste functionalities of Captivate:
  1. Started with the first slide and the first click box. Created and attached the advanced action to that click box. 
  2. Duplicated the click box 4 times and positioned the duplicates over the rectangles
  3. Renamed each click box, opened the attached advanced action and duplicated that as well, renamed as well and edited
  4. For the second slide I duplicated the first slide
  5. Copied a whole bunch of statements from the SeqCheck to use in the BtReset action as well
BTW: I always use the scratch area to keep some information about variables, events, objects, actions in the CP-file

Secrets of cpQuizInfoAnswerChoice and....


Update: 

New version, taking advantage of features in more recent Captivate releases, has been published under:


Intro

This blog post is again inspired by a user question, this time in the Linkedin Adobe Captivate discussion group.  Here is the question:
"I have 4 simple survey questions in my CP file (5.5). How can I capture the yes/no answers and on another slide lead them down a specific path based on their answers? "
In the past I already answered several questions on forums about storing the user answers in variables so that one is able to create decisions based on those answers, or to show those answers later on. Both goals can be achieved using one Quizzing System variable: cpQuizInfoAnswerChoice.

Example

Play this movie and answer 4 survey questions. Contrary to normal questions, there are not 2 steps, Submit will guide you immediately to the next slide. Based on your answers there is a branching to a Beginner, Intermediate or Expert slide (you'll discover my new garden immigrant on those slides as well). For a first view, I do recommend to show the variables, it is much easier to see what is happening. That is the perfect way to track and debug advanced actions. Have fun.


Variables

The system variable is repopulated after each question. To save the answers, it is necessary to use as many user variables as you have answers to store. Since I have 4 survey questions, I created 4 user variables, labeled v_account (first question), v_hashtag, v_chat, v_devices. Because of the choice to show a text caption with the values of the variables, I created another user variable v_view  that is set to 1 if the user clicks on the button View variables.

Slides, events and actions

The example has ten slides:
  • Slide Intro: with the buttons 'No variables' (goes to next slide) and 'View variables' that triggers an advanced standard action ViewVar, very simple (see Gallery). This slide has the text caption TCVariables with the user variables, but its visibility is turned off.TCVariables  is timed for the rest of the project.

  • Slide Question1: I used the On Enter event of this slide to trigger the advanced conditional action ShowVar (see Gallery) that will show TCVariables if the user choose to. The Else part only has Continue as statement. The Submit button triggers the advanced action Quest1 (see Gallery): it stores the value of cpQuizInfoAnswerChoice in the user variable v_account (corresponding with this slide) and goes to the next slide, thus avoiding the waiting time after the pausing point of the question slide. The answer appears as 'True' or 'False'. 

  • Slide Question2: the On Enter event triggers a conditional advanced action EnterQuest2 (see Gallery); this action checks the answer stored in v_account. If the user has no Twitter account (v_account has the value 'False'), it has no sense to present the other questions because this user is clearly a Starter. That explains the Jump to Starter slide.
    The Submit button triggers the action Quest2 that is similar to Quest2, only the user variable has to be changed from v_account to v_hashtag.

  • Slide Question3/Slide Question4: only the actions Quest3 and Quest4 are triggered by the Survey question (executed when the Submit button is pressed), similar action to Quest1, now with user variables v_chat / v_devices. 

  • Slide Decision: this is a very short slide (0,1sec) that will not have been visible to you when playing the project. It was necessary to create this slide because Question slides cannot have a normal On Exit Event. I used the On Enter event of this short slide to trigger the advanced conditional action Decide that will be explained in next part. 

  • Slide Beginner: I used the On enter event to hide the text caption TCVariables. The Next button jumps to the last slide, End.

  • Slide Intermediate: the text caption is hidden by the conditional action Decide, so no advanced action on this slide, the Next button jumps again to slide End.

  • Slide Expert: similar to the previous slide, Next button now jumps to the next slide.

  • Slide End


Action Decide

This conditional action will branch either to slides Starter, Intermediate or Expert, based on these possibilities for the collected user answers:
  1. If the user answered positively to all survey questions, I considered him to be an expert. It is however not necessary any more to check the user variable v_account. Due to the previous described action EnterQuest2, we are sure that v_account has the value 'true'. That is the reason why the first decision 'Expert' of the conditional action Decide checks only the value of the variables v_hashtag, v_chat and v_devices. If all these variables have the value 'true', the user will be navigated to the slide Expert and the text caption TCVariables will be hidden as you can see in this screenshot. The option 'All conditions are true' has been chosen, hence the AND in the last column.

  2. If the user has answered positively on at least 2 questions, I considered him to be an intermediate Twitter user. For the same reason as explained in 1. I am sure about the value 'true' of v_account. That is the reason why I used the option 'Any of the conditions true' in the second decision 'Intermediate' and checked the same 3 variables. The statements are now again hiding the text caption TCVariables and navigation to the slide Intermediate.
     
  3. If none of those two decisions, conditions result in Yes, only the user variable v_account has the value 'true'. In that case I consider the user still as a starter (he has only created a Twitter account). You do not find a decision for this situation, I just let the play head continue. The slide Decision is just before the slide Beginner, and so the play head will get to that slide automatically. This slide has already the correct setup.
     

More possibilities

It is also possible to store the user answers in the same way as described, and show those answers in a text caption on a summary slide, or use the answers in a feedback or review caption
.


Widgets and Custom Questions - part 3

Intro

 
Finally got to writing this third part about using the included widgets to create custom question slides, in this case Fill-in-the-Blank questions with dropdown lists and a Matching question (but without the dragging possibilities of the default Matching question slide - functionality which is only possible with widgets from InfoSemantics).
 
For dropdown lists, perhaps you'll expect me to use the Dropdown or Combobox widgets, which are very similar in use. But since months, my friend (AS and JS wizard) Jim Leichliter warned me not to use those widgets in production because of serious memory leaks. So, waiting for those issues to be solved, I discovered another widget: Listbox which is not suffering from the same illness. Although the layout possibilities are limited for this widget, it has some nice features which I will try to explain in this post. And we will be ecological again, by reusing variables. This widget is not enhanced, it is not possible to control the choice, the associated variables by advanced actions. That is the reason why Retaking is not possible.
 

Example

 
Play with this small SWF to see a worked out example with 3 question slides: two Fill-in-the-Blank and one matching question. Each question slide has one Listbox widget, used in a different way:
  1. to enter 2 answers at once (use CTRL to select the second item) - I provided partial scoring, 5points for each correct answer
  2. to enter 1 answer, score 5 points
  3. same widget is used for 2 choices and multiple answers possible - only correct/incorrect possible with a score of 15points

Listbox widget - functionalities

The Properties dialog box has not a lot of configuration possibilities as you can see: in the upper field you can type the items for the rolldown list, and the second field is meant for variables. No formatting whatsoever: not for the fonts, not for the colors of fill/border. And as for most widgets, no Help available.

What is the meaning of those variables? After some exploration, can offer you these tips:
  • Similar to other widgets, you have to create those user variables separately (see Using Captivate Widgets - some tips)
  • The variables will store the chosen answer in the sequence they are chosen; you only need variables for the possible correct answers; in the example two answers were correct, so I defined two variables; the first answer chosen by the user will be stored in v_one, the second in v_two.
  • Contrary to other widgets, you can have spaces after the commas for the field with items, the space will be considered however as a first character; for the variables avoid those spaces
  • To make the font bigger, increase the size of the widget. It is a bit of trial and error to find a font that corresponds with other text. Do not worry about keeping the width/height ratio, the font will always keep a correct aspect. The widget bounding box is a lot bigger than the dropdown list itself, as you can see on this screenshot. Once I figured out the proper size, I used the size mentioned in the Transform accordion to change all the widgets to the same size.

Reusing variables
Eating my own dog food (see Be a Captivate Ecologist: reuse Variables) I defined these user variables:
  • v_one, v_two, v_three to be (re-)used as associated variables in the Listbox Widgets on the question slides (used 2 on first questin, 1 on the second and 3 on the last)
  • v_correct1, v_correct2, v_correct3 which will get the correct values on entering question slides 1/2 or based on choice for question slide 3; those are reused variables as well
  • v_q1, v_q2, v_q3 are not reused, but will get the string 'Correct', 'Partially correct' or 'Wrong' for the question slides depending on the user's answer
  • v_region is used on the third question slide, to store the choice for 'Flanders' (value = 1) or 'Wallonia' (value = 2)
  • v_score, v_percent will store the score and percentage to be showed on the score slide.

Advanced actions

First Question Slide:

EnterQuest1: standard action triggered on entering the slide
will assign the correct answers to v_correct1 and v_correct2. This is not necessary for the second question slide where I used a simple action (in the Action accordion) to assign the correct answer to v_correct1. On question slide 3 the assignment will be done with the actions triggered by the click boxes over 'Flanders' and 'Wallonia'.
 
BtSubmit1: conditional action triggered by the button Submit
This action has 4 decisions:
  1. Failure: is a mimicked standard action, will always be true but overridden for partial or correct answers by the subsequent decisions (see screenshot in Gallery); it will show the Next button (initially invisible), Failure1 Text Caption and puts 'Wrong' in the user variable v_q1;
  2. Partial: checks if at least one answer is correct, with an OR combination (see screenshot); it shows Next button, Partial Text Caption, hides the Failure1 caption, adds 5 points to the score and puts 'Partially correct' in the user variable v_q1. If the answer is totally correct, this condition is also true and statements will be executed, but part of them will be overridden by one of the Success decisions. The Next button that was made visible by the Failure statements, will remain visible.
  3. Success1: because the correct answers have no imposed sequence, we need two success decisions (second has v_one and v_two interchanged). This action (see screenshot) checks if both answers are correct, shows the Correct Text Caption, hides the Partial Text Caption, adds another 5points to the score (combined with the previous 5 = 10 points), and puts 'Correct' in the user variable v_q1.
  4. Success2: similar to previous, just switch v_one and v_two in the condition.

Second Question Slide:

This slide has a simple action on Enter to assign the correct value to v_correct1.
 
BtSubmit2: conditional advanced action triggered by the button Submit
This action has 1 THEN - ELSE decision, checks if v_one is equal to v_correct1; think you can figure out what it is doing, similar to the previous Submit action.
 

Third Question Slide:

On this slide, the texts Flanders and Wallonia are covered up with click boxes CB_Flanders and CB_Wallonia. Both trigger a standard advanced action (with same name, which is possible if you have labeled the click boxes first). You have a screenshot of the Flanders action in the Gallery, it is really self-explanatory: assigns the correct values to v_one, v_two, v_three variables, populates v_region, hides the text caption Wallonia and makes the initially invisible Widget visible. For the Wallonia action, an extra statement applies a custom motion effect.
 
BtSubmit3: conditional advanced action triggered by the button Submit.
This action has 7 decisions:
  1. Failure: is a mimicked standard action, totally similar to the one in btSubmit3; it will be overridden by one of the subsequent decisions if the answer is totally correct
  2. till 7. Success1..... Success6: for the same reason I needed to have 2 Success decisions for BtSubmit1, since now 3 items are correct there are 1x2x3 = 6 possible combinations, hence 6 decisions. One of them, Success4 has a screenshot in the Gallery. It is similar to the Success decisions for the first question slide.

Score slide

EnterScore: triggered on entering the slide, to calculate the percentage (see screenshot).
 

Conclusion

Sincerely regret that I couldn't do a comparison with the dropdown and combobox widgets because ot the issues I mentioned. They have better formatting options, but no possibility to select more than one item as I could use with the Listbox widget. And I also regret not to be able to control the content of the variables with an advanced action.
 
Hoping that this new example of reusing variables and of the way conditional actions are executed linearly are useful for someone.