Skip to main content
Participating Frequently
October 11, 2016
Question

Change the color of a Text and of a button with advanced actions and conditional script

  • October 11, 2016
  • 1 reply
  • 1039 views

Hi everyone

I'm new to Captivate and I'm using Captivate 9 ond Windows. I didn't found an answer to my problem in the database.

As a training in Adobe Captivate I try to rebuild a version of "Who wants to be a millionaire"

What I try to make is a combination with the variable, advanced options and the conditinal script.

Step one: When I click on one of the four answer boxes the variable 1 is saved for the correct answer and the value 0 is saved for the wrong answer.

So when I click on the submit button for an answer, it gets me to the next slide if the variable is 1 or say that I have lost when the variable is 0.

What I want to do is to change the color of the text on the right side, which indicates the actual ammount of money that I have won.

So when I come from question 1 to question 2 I need to change de Color on the right side from this text to highlight the current amount of money.

So for example change the color from the previous amount of money back to the normal background color and highlight the actual amount of money I can win (for example 1000 for the second question).

So can I somehow change that color of text with the advanced options and conditional script?

When not, how can I achieve it?

The same question for the buttons to give feedback to the players.

Thanks for your help.

This topic has been closed for replies.

1 reply

Lilybiri
Legend
October 11, 2016

Not sure to understand your questions. Use states to change colors. THere is a Change State command that you can use in the THEN and ELSE part of a conditional action that could be triggered by the On Enter event of the slide where the color has to change, based on the value of the variable. If you have to reuse that action over  and over again, I'd recommend a shared action.

You can get more help if you explain little bit better because I have no idea what you mean by 'advanced options', and I translated 'condiitional script' to conditional advanced or shared action.

What is the meaning of that button that has to change color?

LanidelAuthor
Participating Frequently
October 11, 2016

Thanks for your answer.

Sorry for my bad translation. I meant of course advanced actions and conditional actions.

Ok. I will have a look on the shared action. It sounds intresting.

I can't choose anything from the dropdown menu in "Change state to" in the advanced action preferences neither can I write text into.

The idea is to "log-in" the question as they do it in "who wants to be millionaire" before they give the right answer. When my students click on the button the button gets orange and a validation button appears and after validation the answer button gets green or red if the answer was right or wrong. Do you understand now what I mean?

I have found an easy solution for the text problem. I just change the color on each slide into the color which I want.

But for the buttons would be nice to find a solution.

:-)

Lilybiri
Legend
October 11, 2016

You have first to create the states, before they will be available in the dropdown lists. You can have a look at my blog, I have written a lot about using states and shared actions. Here is one link:

1 action = 5 Toggle Buttons - Captivate blog

That is an article where I use a custom state to indicate a changed situation for the toggle buttons. You can use something similar for your buttons. Create three extra custom states with the colors Orange, Green, Red (will use those names for the states). For that button you create this standard advanced (or shared) action:

    Show Bt_Validation

    Enable Bt_Validation

    Change state of Bt_First to Orange

For the validation button you'll need a conditional advanced action

  IF......             where you write the condition to see if answer is correct

     Change state of Bt_First to Green

  ELSE

     Change state of Bt_First to Red