Copy link to clipboard
Copied
I would like to create a conditional action that would change a button to a new/custom state. I've tried some simple advanced actions, for example, when I enter a slide, a button will change states, but I have had no success using a conditional action. This leads me to the following question:
If a button has the literal value of 0 or 1 (on or off) does that mean it only applies to Normal (0) and Visited (1) states? And if a specific state has a value of 0 or 1, how do I create a variable to recognize that? If I have a button on Slide B that is in a visited state, how can I get another button on Slide A to recognize the Slide B button's visited state as a trigger to change the Slide A button to the custom state that I want?
I'm probably overthinking this and the answer is most likely staring me in the face, but any help would be appreciated 🙂
Copy link to clipboard
Copied
I think you may be misunderstanding how Captivate's interactivity works.
You can see the existing states of an object by selecting the object and clicking the State View button in the Properties tab. You can also add or remove states once you are in State View mode.
When you set a Smart Shape to Use as Button it has several default states such as Normal, Rollover, Down (and Visited if you want to add it), but you can create any number of Custom States as well if you need to change the appearance of the button for some reason. These custom states remain unseen until you change the object's state using actions.
Buttons don't "have a literal value of 0 or 1, on or off, yes or no. I think you may be confusing button objects here with User Variables. Variables can store values. Boolean variables are the ones that only have two possible values (0 or 1, etc).
Variables are used in the Decision Block area in the upper section of Conditional Actions to determine whether or not actions in the lower part are executed. These variables are also assigned new values by executing actions.
Reading over your question post, I think what is happening is that you were assuming a buttons would automatically change state if you changed the button's "value" to 1 from 0 or vice versa. It's not that simple. What you really need to do is use the Change State Of action and refer to the specific object whose state you want to change, selecting the target state from a dropdown menu that shows you the current states available for that object.
Now, having changed the state of an object from one state to another, you might also want to track which state is currently selected for that object. You could also use a variable to do that, but you would need to assign the tracking variable with a value that then matched the current state of the object.
So if you gave a button a Custom State called RedWarning (perhaps because you wanted the button to change colour under some given condition) then you would need to create a User Variable to track the state of this button so that Conditional Actions would be able to use the Variable when making decisions that might involve this button.
Does any of this help you with your problem?
Copy link to clipboard
Copied
Thanks Rod! Your input is valuable and useful 🙂
Copy link to clipboard
Copied
Will not replace Rod's long explanation, be sure.
AFAIK no exposed system variables are linked with states. There is a basic difference between custom states and inbuilt states. For more details about states,have a look at:
http://blog.lilybiri.com/about-state-commands-and-a-progress-bar
For your example: use the action triggered by the button click to assign the value 1 to the Boolean user variable which you have to create for that button. That would mean that button has been clicked and the Visited state appears automatically. I suppose in this case that the option 'Retain state on slide revisit' is checked off (which is not the default situation). Now you can use a conditional action to check that Boolean user variable, and show a custom state for another object.
My first impression when reading your question was the same as Rod's, you seem to implicate that a button has automatically an associated variable which is not the case. The only interactive object which has automatically such a variable is the Text Entry Box.
Copy link to clipboard
Copied
Thanks Lilybiri!