How to make the "correct delay"

Hey! I am working on a quiz. If a person clicks on the correct answer, then the button turns light green for a few seconds and returns to its original position. I reviewed many topics on this topic, many advise using some kind of “extension” … Is it possible to use some standard methods? or where is the error in mine?


2

You never return Background color to original, so when clock timer add a procedure to check if background color is green then set it to original color

But instead of using clock, why don’t you use notifier with green color for correct answer and red color for wrong answer. So the page always be in original colour . Only the notifier show alert background colour alone will change

Yes, but I need to use a “delay”, because the color of the button changes very quickly and the user does not have time to see that he answered incorrectly, and for some reason the delay does not work in my version

it seems to be, you have overseen the answer from @dora_paz

Taifun

No … At the very beginning, the background of the button is dark green, after pressing the button it becomes lighter and there should be a delay, but “delay” does not work.

Yes, but I need to use a “delay” because the color of the button changes very quickly and the user does not have time to see that he answered incorrectly, and for some reason the delay does not work in my version.

you have to set the original color in the Clock.Timer event as @dora_paz already tried to explain…
your blocks do not wait… you have to get used to asynchronous programming…
Taifun

1 Like