Skip to main content
Inspiring
April 13, 2016
Question

Hiding object with Advanced Actions?

  • April 13, 2016
  • 1 reply
  • 308 views

Within Captivate 8's Advanced Actions what Action should I choose to HIDE the object once a button has been clicked a second time. Ideally, I would like for the object to show and hide each time the button is clicked.

Thanks for your help.

This topic has been closed for replies.

1 reply

Lilybiri
Legend
April 13, 2016

This is a very similar situations as the one described in this thread, where I wrote out a conditional advanced action that can be used to hide a button when it has been clicked twice:

Allow button to only play audio twice

Maybe I don't understand correctly, but what do you mean by the sentence ' show and hide each time the button is clicked.'??? An event can trigger only one of the two: either it hides that object or it shows it.

RodWard
Community Expert
Community Expert
April 13, 2016

I think what we're looking for here is a Toggle action that alternately Hides or Shows the object.  If the object is hidden, then executing the Toggle action SHOWS it and vice versa.

You will need to have a variable that gets toggled between 0 and 1.  Use this variable in the Decision Block of your Conditional Action.

Let's say your object starts out hidden and the variable starts out with a value of 0.   If the variable is 0, then the first Action line will set it to 1 and then SHOW the object, ELSE the action will assign the variable with 0 and HIDE the object.

Lilybiri
Legend
April 13, 2016

OK, in that case, have a look at this blog post:

1 action = 5 Toggle Buttons - Captivate blog

That action is used for different purposes, one of them is to hide/show an object.