Skip to main content
jumper5558
Known Participant
July 5, 2018
Question

Captivate 9: Button with 2 actions

  • July 5, 2018
  • 3 replies
  • 1472 views

Using Captivate 9 on Windows 7 64-bit

I am working on a training video. I want to make an interaction that a user can click each button to learn more about that item. What I want the button to do is open a small dialog box with information about that button and I would like it to play a little audio clip simultaneously and the user will have to click on an x to close the window (this part of the x is not so important if it cannot be done). I already figures out how to create a small dialog and I'm doing that by making new states and when the button is pressed it would change the state to that specific item. Is there a way to perform another action to put the audio on that button?

P.S. There is an add audio button under properties > Options of the button but this currently plays all of the buttons voice notes at once.

I also do not want the learner to be able to advance to the next slide by clicking NEXT until the all the buttons are clicked. I have already succeeded doing by going to the skin editor and taking off all the forward options. I also placed a next button after the slide completes. However, I am not sure how the program will know not every button was pressed.

I am a beginner in captivate so if you can please give me a step-by-step solution.

 

Any help would be appreciated.

Thank you very much!

    This topic has been closed for replies.

    3 replies

    Inspiring
    July 5, 2018

    For each button you need a separate conditional action following the pattern I gave before. Each button's action only assigns a value to the variable for that button (btn1_action says Assign 1 to v_btn1, btn2_action says Assign 1 to v_btn2, etc). The second decision tab tests all of the variables to see whether or not to show the NEXT button. You should not be assigning a value to more than one variable in any one action.

    To make an advanced action

    1. Choose Project -> Advanced Actions ...

    2. Click the + button in the upper right corner of the window.

    3. Make sure you select Conditional Action from the Action Type dropdown.

    4. Create and save (Update) the action

    5. Click the button you wish to use to trigger the action. (E.g. Button_1)

    6. In the Properties tab, choose Actions (next to Style).

    7. Choose Execute Advanced Actions from the On Success dropdown.

    8. Choose your new action from the Script dropdown.

    If you do not like using menus, you can start at step 5. After step 7, click the yellow folder icon next to the Script dropdown, then go back to step 2. You must still make sure you do step 8 - it is no good creating an action, but then forgetting to actually assign it to your button (the voice of experience is speaking here)!!

    For the On Enter action:

    Lilibiry's solution with another variable will work, but you will have to add a line to each  showNext? tab of each of the button advanced actions to make it work - Assign v_slideComplete (or whatever name you give the variable) with 1

    OR, you can forget that step, forget making a variable for v_slideComplete, and just use the same conditions from the showNext? tab in your OnEnter conditional advanced action:

    onEnter_action

    IF v_btn1 = 1 AND v_btn2 = 1 AND v_btn3 = 1

    THEN

    show button_Next

    Good luck!

    jumper5558
    Known Participant
    July 6, 2018

    The problem with this is I already have the Actions position used since I made states because I'm using a  "click to reveal" slide. Every time a trainee presses a button I need it to open a new state. Can I make the same button perform 2 actions at once? Or am I able to add this to advanced options as a second line for each button. So it would be:

              IF 1 is equal to 1

                   Assign v_btn1 with 1

                   Change state of Text_Caption_126 to (state I want)

    Lilybiri
    Legend
    July 6, 2018

    You may be confused because you got two user answers with slightly different solutions. Mostly I step away in that case, just to avoid that. You can add as many commands to a standard action (1 is equal to 1) as you want. Just be careful with the sequence, although in this use case there is no problem.

    Inspiring
    July 5, 2018

    To show the NEXT button only after all other required items have been clicked you'll need a variable for each item and a conditional action that can test all of those variables. When all of the variables say that all of the items have been clicked, the action will show the NEXT button - otherwise it will remain hidden.

    Start by turning off visibility for the NEXT button by clicking the "eye" icon next to it's name in the Properties tab.

    If I have 3 buttons that I want the user to click, I need to create the variables v_btn1, v_btn2, v_btn3 (or whatever makes sense to you). Assign each a value of 0 when you create them.

    For each button, you need a conditional advanced action that will:

    1. assign the value of that button's variable to 1 when clicked

    2. do all of the things you want the button to do (show things, etc.)

    3. in a second decision tab, test IF v_btn1 == 1 AND v_btn2 == 1 AND v_btn3 == 1, THEN show the NEXT button

    As Lilibiry will say, if all of the buttons do similar things, a shared action can be very handy in this situation. She has written extensively on the use of shared actions. If you are unfamiliar or uncomfortable using shared actions, just stick with a separate advanced action for each button for now.

    Set NEXT button visibility to hidden

    Create variables

    First tab of a conditional advanced action (I use Captivate 9 - Cap 2017 looks a little different). Add in all of the other things that the button-click will always do.

    Second tab of the same action

    The timeline - all pause points of the buttons are aligned. If you have audio or animations that take time, you might have to adjust the timing of the NEXT button.

    Cheers!

    jumper5558
    Known Participant
    July 5, 2018

    Hi I was unable to get this to work. Do I create one action, add all the variables:

    IF 1 is equal to 1

         Assign v_btn1 with 1

         Assign v_btn2 with 1

         Assign v_btn3 with 1

    and then have a new tab with the Show Button_Next action

    Or do I need an action for each of these buttons?


    Also how do I get it to work on the slide? Do I click somewhere on the screen where there is nothing showing? Then go to actions > On Enter > Execute Advanced Options > Script > ActionIJustCreated

    If possible please send a short video or slightly more steps.


    I'm sorry.

    Lilybiri
    Legend
    July 5, 2018

    First question: add the audio to the state. Watch this movie, the first automatic list has audio linked to each state:

    http://www.lilybiri.com/published/Lists/index.html

    For the Close button:

    More is in a...hyperlink - Close button - Captivate blog

    jumper5558
    Known Participant
    July 5, 2018

    Hi, thank you for your reply! Is there a way to do my third question? (I also do not want the learner to be able to advance to the next slide by clicking NEXT until the all the buttons are clicked. I have already succeeded doing by going to the skin editor and taking off all the forward options. I also placed a next button after the slide completes. However, I am not sure how the program will know not every button was pressed.)

    Lilybiri
    Legend
    July 5, 2018

    Added my first answer in the Jive forums, because otherwise you would have had to wait hours before seeing it because it had hyperlinks.

    I am not sure your third question is complete. Will you allow the user to come back to that slide? If yes, would you force them again to do everything before the Next button appears?  Have some blog posts about that as well, but will not post links for the reason mentioned above, am now in the portal where I have to be 'moderated', in the other forum I am moderator.

    You will have to make that Next button invisible in output. All the buttons have either their pausing point at the same moment or you have only one pausing point on one of them. Since they don't have to be clicked in sequence, you'll need to create one user variable for each button. Give them a default value of 0 (zero, this is not a good font for numbers). When a button is clicked the corresponding variable has to be toggled to 1.  After that you'll have to check the value of all variables. If they are all equal to 1, which means that all buttons have been clicked, you show the Next button.

    That means creating an advanced action with two decisions. But you are a newbie. apparently without training.  And in 9 the combination of a standard decision with a conditional decision is not easy for newbies. Have posted the solution tens of times on the forums.... 

    First decision 'Always'

        IF  1 is equal to 1
             Assign var with 1
             Do what you want that button to do

    Second decision 'Checker'

        IF var1 is equal to 1 AND
              var2 is equal to 1 AND
              .....
         Show Bt_Next