Skip to main content
Participating Frequently
June 16, 2016
Question

Using multi state objects within advanced actions.

  • June 16, 2016
  • 1 reply
  • 2276 views

Hello all. 

I'm new to adobe captivate and also new to developing digital content.  I'm largely self-taught by searching forums, blogs, and guides on this site and others.  I've read a lot trying to find an answer to this problem.  I am trying to have a set of buttons that toggle between yes and no via multi state.  The results from that choice, however, need to be fed into a conditional action.  Essentially there is a table of 5 rows, each with 3 columns of yes/no buttons.  Each row relates to a question, and the combined yes/no responses from each set of three buttons determines what shows on the next slide.  I can make the button toggle between states, I can write the script for the advanced action and attach that to a submit button for each set of three, but I can't seem to find a way to a) toggle between states, b) toggle boolean values, AND have those values available as inputs to the conditional action.  I've tried many different ways but always seem to run into a road-block.  This seems like it should be simple to do..... but how?  Any ideas for a newbie?

This topic has been closed for replies.

1 reply

Lilybiri
Legend
June 16, 2016

Post what you have already: the conditional action (use the Preview button in the Advanced Actions dialog box, it looks like a Play button, top right control panel), a screenshot of the slide. You will need variables of course to track the states. Your goal is not yet totally clear to me. Do you have 15x2 buttons + how many Submit buttons? How many states do you have for each button, except the InBuilt states? That is a lot of interactive objects on one slide. Can the user change his mind?  As for the toggle buttons, you can have a look at:

1 action = 5 Toggle Buttons - Captivate blog

Simple for a newbie? Not so sure. There is a Toggle command, there is Change State of command.

Juzme_caAuthor
Participating Frequently
June 16, 2016

I've built a simplified slide with only one set of three buttons.  Rather than the complicated script I'll need to show or hide something, In this simplified slide I'm only working with the leftmost button.   I'm looking to merely assign a value of 1 to yes and 0 to no and then if 1 then hide the green shape.  If I can accomplish this seemingly simple task, I should be able to make the rest work. 

There are only two states associated with each button (essentially no, as default and yes). 

This is where I am right at the moment.   I've got that first button set to a value of zero on screen enter, and the action on the button itself set to "Go to next state".  The problem, it seems, is getting it to also set a value of 1 when clicked.  And, yes, they can change their minds.  I've tried many other things.   The one I thought would work is to do an advanced action such that if 0 is read, x happens and the button is assigned a 1.  BUT, I would also need the reverse so that if 1 is read, y happens and the button is assigned a 0.

I did read   1 action = 5 Toggle Buttons - Captivate blog  several times in the last few days but the actions are just different enough that I can't seem to apply them.

I've got a feeling I've been going in circles so much that I'm now trapped in a Square!

Lilybiri
Legend
June 16, 2016

Newbie, indeed. Let us first start with real basics: you do not need a slide with such a duration, please, that is simply crazy. If you do not have an audio clip (slide audio) or objects coming in at different times, keep with the standard duration of 3 seconds.

You have to pause the slide, with one or multiple interactive objects. You talk about 'buttons' for Yes/No but I don't see any button and I read that they have to type in Yes or No? A button is an interactive object: it has a green timeline instead of a blue (when it is not selected), it has an Actions tab in its Properties panel and it (in default settings) has a pausing point. Moreover they will have already 3 InBuilt states: Normal, Rollover and Down.

Have a look at this old blog post about the concept of the timeline. Most is still valid for CP9 (except the changes for the Effects timelines):

Tiny Timeline Tidbits - Captivate blog

When I look at the three choices in your example, I wonder why you want to use states at all? Why not use the Checkboxes interaction, where the user only has to click the checkboxes he wants to select? You can have multiple interactions on one slide, put them horizontally or vertically. Here is another link:

Tips - Learning Interactions - Captivate blog

It is just a suggestion of course.

If you absolutely want to do it with states, where do they have to type the Yes or No? I don't see a Text Entry Box in your screenshot, just a shape with No? Or do you mean that you want them to click on one of the shapes (with No) and have it change to the state with Yes? Then you'll have to turn those shapes into shape buttons, which will make them clickable. Keep them paused at 1.5secs.  Create a user variable to be associated with each shape button. I will label them this way: v_11 (for first row, first button) for SB_11, v_12 for SB_12.... etc. Give them a default value of 0 (which means No) and trigger a shared action for each of those Shape buttons, with two commands

    Change State of SB_11 to YesState

    Assign v_11 with 1

The objects in italic will have to be parameters, which you enter for each of the 12 shape buttons.

I don't know what you now need to do on the next slide, based on the results of all those actions? You talk about a Submit button, is that necessary? What did you want to do with that Submit button? The clicks on the 12 shape buttons will have resulted in all the Booleans to have the chosen value.