Accessibility
Adobe
Sign in Privacy My Adobe

Community Publishing

Created:
2010-08-25
Last Updated:
2010-08-25
by
User Level:
Intermediate/Advanced
Products:
Adobe Captivate

Need more tips and tutorials?


Combining Standard and Conditional in one Advanced action


Goal

Sometimes it is necessary to combine a Standard action with a Conditional action because both have to be triggered by same event (button click, entering/exiting slide...). This was rather straightforward in Captivate 4, in Captivate 5 you have to choose between Standard and Conditional action. I will try to explain the workaround: combination will be a Conditional action, where one of the decisions will mimick the Standard action. I do recommend to check this tutorial first if the terminology is not clear to you: 

Conclusion based on multiple scores 

 

Sample SWF

Play this SWF for better understanding of the workflow. There are only three simple slides in this movie. In the first slide (instruction) the playbar is visible. In the second slide (ButtonsSlide) the playbar is hidden and will only appear after the user has clicked three buttons. In the End-slide you have the opportunity to get back to the second slide. Please, do use the playbar to navigate.

 


Variables to be created

Three user variables are needed, I labeled them v_click1, v_click2 and v_click3. They are linked to the three buttons on the second slide (ButtonsSlide), and will be used to check if all the buttons have been clicked. They will get the value 0 when entering the second slide (ButtonsSlide) by a standard Advanced Action, labeled Init. When a user clicks on one of the buttons, the associated user variable will get the value 1.

 

Slides and objects on slides

After the intro-slide (self-explanatory) you'll find:

ButtonsSlide
  • Text Caption with instructions to have the playbar back.
  • Three buttons. Each of the buttons will trigger an Advanced Action (with a combination of a standard and a conditional action); I labeled those actions Button1Action, Button2Action, Button3Action
End Slide
  • Text Caption with instruction (Effect Pendulum applied)
  • Click box covering the Text caption, with Success action = Go to Previous Slide

Advanced actions

Init (standard action) to be triggered on entering slide 2 'ButtonsSlide'
 

This is a very simple action that resets the user variables v_click1v_click2 and v_click3 to the value=0. This isnecessary because the user can return to this slide. If you do not need this, you could assign the default value=0 to the variables when creating them. In the action Init the system variable "cpCmndShowPlaybar" is set to 0 to hide the playbar. Here is a screenshot of this action. It is a good practice to add 'Continue' as last action in a Standard action.

Adv. Action Init

 

Button1Action (combination standard+conditional action) to be triggered by click on Button "One"

The actions Button2Action and Button3Action are similar, only the user variable in the 'standard' action has to be edited. Use the duplicate functionality.

In this Advanced action I used two decisions:

1 ClickAdded (= standard action mimicked by a decision)

In this action the content of the user variable v_click1 will be changed from 0 (value attributed by the Init action) to 1. This has to be done before checking the clicks on the buttons, thus it is necessary to put this decision first of all. Decisions in conditional actions are always performed from top to bottom (for the actions) and from left to right (for the decisions). To mimick the standard action, which is an action that has always to be executed when the user clicks on the button, I created a decision that will always result in a positive answer (Yes). I'm a maths lover, so it is a maths decision 'Is 1 equal to 1?'. Since the decision will never result in a negative answer, I do not care about any ELSE action. And there will not be an issue if the user clicks twice on the same button, because the action always puts the value=1 in the user variable. This is a better action than incrementing the user variable with 1 because that would result in a variable value > 1 if the user clicks more than one time on the button.

Here is the screenshot of this decision:

ClickAction for Button1


2 TestPlaybar (really conditional)

This decision checks if all the buttons have been clicked, a threefold condition with AND operators. If the answer is Yes, the playbar will get visible by changing the system variable cpCmndShowPlaybar.

If the answer is No, for the ELSE actions I only rewind the playhead to prevent the timeline to continue.

TestPlaybar Then actions

TestPlaybar ELSE

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License