Skip to main content
Participant
August 6, 2013
Answered

Show image based on variable value from user choice

  • August 6, 2013
  • 1 reply
  • 598 views

Hi everyone, hope someone can help with what I think is a simple request. Ive only been using Captivate 7 for a few days and still feeling my way around things.

I have setup a multiple choice question quiz which has 4 possible answers (1 correct, 3 incorrect.)

This works fine out of the box, and when a user presses the submit button the response box appears showing whether the user has answered this correctly or not.

What I want to do is advance this a little bit, and if the user gets the answer wrong I would like a little tick image to appear next to the correct answer.

I have included my image onto the stage, given it an alpha of 0 to effectively hide it.

In the advance interactions i have created a variable called showImage with an initial value of 0

What I am struggling with now is how to increase the variable value to 1 when a user selects a wrong answer and the change the alpha from 0 to 100 to show the image depicting the correct answer choice.

I know that what I have describe is basically what happens at the end of the quiz if a user goes to review their answers but I would like to be able to do it as they progress through the questions.

many thanks for your help

D

This topic has been closed for replies.
Correct answer Anjaneai_Srivastava

Hi D,

What you should do is rather than making its alpha 0. Hide it completely from stage till user gives in correct answer.

So, I want you to --

1) insert an image

2) Go to image properties panel and the very top -- Uncheck -- "Visible in output" option.

3) Go to Quiz Properties, choose under Actions- Failure Level as 1/2/3

4) Select "Last Attempt" as "Show" and the image you you inserted

This way the image would appear if your user selects an incorrect response.

i hope this helps.

Cheers,

Anjaneai

1 reply

Anjaneai_Srivastava
Adobe Employee
Anjaneai_SrivastavaCorrect answer
Adobe Employee
August 7, 2013

Hi D,

What you should do is rather than making its alpha 0. Hide it completely from stage till user gives in correct answer.

So, I want you to --

1) insert an image

2) Go to image properties panel and the very top -- Uncheck -- "Visible in output" option.

3) Go to Quiz Properties, choose under Actions- Failure Level as 1/2/3

4) Select "Last Attempt" as "Show" and the image you you inserted

This way the image would appear if your user selects an incorrect response.

i hope this helps.

Cheers,

Anjaneai

dh061074Author
Participant
August 7, 2013

Thank you Anjaneai for your reply.

After posting my question I did look at things again and came up with a similar method to what you suggest.

I had to show/hide multiple elements on the page so I used and Advanced Action and created pretty much the same steps you have posted and have achieved my desired effect.

thank you once again.