

Variables and Advance Actions to Toggle a Button State and Show/Hide an Object
Hi y’all,
So I was looking through youtube for tutorial videos on Adobe Captivate, and I came across this very helpful video: https://www.youtube.com/watch?v=zLDdlBFY84c
It teaches you how to work with Variables and Advance Actions to Toggle a Button State and Show/Hide an Object, and I thought it might be nice to share.
I went ahead and recreated this “toggle on and off” interaction using these following steps:
Variable:
Created a variable (on and off) under project -> variable with the value of 1 (True).
Advance Action:
Created an advance action with conditions (If/else) under project -> Advance Actions.
Here is the zip file/result of this mini project:
Hope you guys are able to benefit from this, and are able to apply this to some of your works!
Best,
ZQ
Hi y’all,
So I was looking through youtube for tutorial videos on Adobe Captivate, and I came across this very helpful video: https://www.youtube.com/watch?v=zLDdlBFY84c
It teaches you how to work with Variables and Advance Actions to Toggle a Button State and Show/Hide an Object, and I thought it might be nice to share.
I went ahead and recreated this “toggle on and off” interaction using these following steps:
Variable:
Created a variable (on and off) under project -> variable with the value of 1 (True).
Advance Action:
Created an advance action with conditions (If/else) under project -> Advance Actions.
Here is the zip file/result of this mini project:
Hope you guys are able to benefit from this, and are able to apply this to some of your works!
Best,
ZQ
You must be logged in to post a comment.

- Most Recent
- Most Relevant
Thank you for this post. I’ve been working on a project where users can hover over a word and see how that word can be used in a learning objective with definition, example etc. Since I want to publish via HTML 5, I realized that I couldn’t use the built in tools and instead had to use advanced actions. I’ve also found this tutorial helpful from Linked in Learning: https://www.linkedin.com/learning/captivate-8-mobile-and-responsive-design/using-advanced-actions-to-replace-rollover-images
Lynn, maybe you missed this post:
Thanks for mentioning the inspiration source of your video, which is very rare! Congrats.
I know that YouTube is considered now the ‘bible’ or the ‘koran’ of learning, findi this very worrying, considering the total lack of curation on that medium.
I have several blog posts about Toggle buttons, which are interesting to see the evolution of possible workflows. At this moment I mostly use multistate objects, for toggle buttons and show/hide objects. I will post a comparison of the different workflows later on, with its advantages.
Just some tips:
Be careful with labeling, you may ignore that labels have to be unique. Most YouTube videos are very sloppy. There are many ways to recognize a name as being a variable. System variables start with ‘cp’, user variables in all my blogs and interactive vdieos/movies will start with ‘v_’, other epxerts use ‘var’ as first characters for variable names.
The user variable you created is a Boolean. It may be confusing for newbies that you write ‘valyue is True’ but show a value of 1.
Problem with a toggle button using a custom state to show the alternative is that the other InBuilt states (Rollover and Down) cannot be toggled. It would be a good idea to add a screenshot of your Object State panel, especially for the Button. I see that you simply deleted those InBuilt states.
Will post some links in a separate comment, to avoid waiting time for this comment due to moderation. You’ll see that I prefer using shared actions, because that action can be used not only for hide/show toggle buttons but also for CC on/off, Audio on/off. etc…