Skip to main content
February 3, 2016
Answered

Is it possible to Click-Reveal Click-Hide button?

  • February 3, 2016
  • 3 replies
  • 2784 views

Hi, I am trying to create a click reveal button, but on the subsequent click on the same button, it hides what was previously revealed. Is this possible?

Thanks!

    This topic has been closed for replies.
    Correct answer Lilybiri

    I have several blog posts explaining the work flow. Have a look at this last one (for CP9):

    1 action = 5 Toggle Buttons - Captivate blog

    Shared actions have the advantage that you can switch between groups and objects as parameters. In your case: if you have several interactive objects on the same slide, to which you want to assign this toggle behavior, you'll have to hide everything that has to show up, then show the appropriate item. By grouping all objects this can be done very easily with a two-command shared action:

       Hide Group

       Show item

    3 replies

    Known Participant
    February 3, 2016

    The advice posted in response to this query is valid and very useful.

    It is a shame that we have to use a user defined variable to do this. I think a better alternative would be to use the "visible" property of the object that you want to hide or show. Unfortunately, Captivate isn't designed to let us refer to object properties or to manipulate them. Bringing this up because I think that is a direction that the Captivate engineers should consider.

    Lilybiri
    Legend
    February 3, 2016

    I'm sure that you can do this with JS as well. If you once define that user variable v_visib and use a shared action that you can use in any project, you'll never have to define that variable another time. Whenever you drag the shared action from this library to the library of another project, the variable is automatically created. Takes less than 30secs. I think it would even be longer if you had to to do that with all the clicks and mouse movements in Captivate to change the visibility property.

    If you want to use Captivate for more than just very basic courses, you will need to use variables and actions. The alternative is using a real programming language like JS.

    Lilybiri
    LilybiriCorrect answer
    Legend
    February 3, 2016

    I have several blog posts explaining the work flow. Have a look at this last one (for CP9):

    1 action = 5 Toggle Buttons - Captivate blog

    Shared actions have the advantage that you can switch between groups and objects as parameters. In your case: if you have several interactive objects on the same slide, to which you want to assign this toggle behavior, you'll have to hide everything that has to show up, then show the appropriate item. By grouping all objects this can be done very easily with a two-command shared action:

       Hide Group

       Show item

    RodWard
    Community Expert
    Community Expert
    February 3, 2016

    Yes.  You will need to use the button to execute a Conditional Action that uses a tracking variable, the Toggle action, and then Show / Hide actions accordingly.

    Basically, your tracking variable gets toggled between 0 and 1 by the toggle action, and the Conditional Action looks at these values to determine whether or not to show or hide the relevant objects.