Skip to main content
Gracie_Li
Known Participant
September 7, 2017
Question

Programming button states

  • September 7, 2017
  • 1 reply
  • 881 views

Hi, I am trying to work with states in Captivate 2017. I want to program them so that I have a normal, rollover, down, active and visited state for each. When a button is clicked, the button state will change to active and content will appear. Once another button is clicked then I want the previous content to disappear and the button state to change to visited.

I used to program this manually in previous versions of Captivate but I cannot figure out how to do this in 2017. I would appreciate help on this. Thank!

This topic has been closed for replies.

1 reply

Lilybiri
Legend
September 7, 2017

Normal, Rollover, Down and Visited are InBuilt states in CP2017. You have to create the Visited state yourself, it is not yet part of the object style (will be fixed in a patch I hope).

Inbuilt states occur in a specific situation, you don't have control over that. What do you mean by 'active' state? That should be a custom state, and you have to apply that state by an action. It will replace the Normal state. As long as you are on the slide, you'll have to change back to the Normal state with an action as well.

I would group all content. The (shared - I would choose a shared) or advanced action will look like this:

  Change state of ButtonPresent to Active

  Change state of ButtonOther to Normal    has to be done for all the other buttons on the slide

  Hide Group

  Show ContentPresent

Gracie_Li
Gracie_LiAuthor
Known Participant
September 7, 2017

Hi! Thanks for replying.

I think it would be best if I provide screenshots. I understand that the Active is a custom state. As you will note in the images below, I want the learner to go through the various module buttons to learn more about each. However, I want the button they click on (i.e., 1)  to become 'active' where they will have info provided to them and when they click on another button (i.e. 2), the previous button (i.e., 1) would then be registered as visited (color changes). The problem is that I cannot guarantee in which order the user will click on the buttons. I can do this if I go to another slide then jump back but I can't figure out how to do this staying in the same screen.

Here are some screenshots:

Active state:

Visited State:

On-screen for learner:

Lilybiri
Legend
September 7, 2017

The work flow I described in my first answer was taking into account the fact that you remain on the same screen. You'll have to create that action for each button, and edit where necessary. But you told about content to be displayed, do I now understand correctly that the content is not separately but just included in the Active state? That makes it more complicated because you have to track which buttons are already clicked, and that means a tracking variable for each of the buttons and conditions instead or normal actions.

Six variables: v_1, v_2..... v_6 will act as Boolean. Default value = 0, when having been clicked it will be toggled to 1. You need 6 decisions (tabs) for the  action.

  First decision is not conditional:

    Assign v_1  with  1        has to be edited for each button, another variable

    Change State of Bt_1 to Active   (or Go to Next State will work as well)

  Second decision conditional

     IF v_2 is equal to 1

       Change State of Bt_2 to Visited

     ELSE

       Change State of Bt_2 to Normal

The second decision has to be repeated and edited for the 4 remaining buttons

Advantage of the approach: you can even have a 7 th decision which checks if all buttons have been clicked and have something happening in that case.