Set and reset a time counter


#1

Hello everyone,

I’ve been looking for a solution to this problem for a long time and I thought maybe you’ve had it too:

I would like to have 2 buttons which, when pressed, show a hidden message containing a counter. If you press one button, the counter counts up, if you press the other, it counts down. The message should be shown for 3 seconds and then hide.

–> However, it should NOT hide if a button is pressed again during the show. The 3-second counter should then be reset and the message should only hide after the time has elapsed

.

I use the “Wait” command, which causes the message to fade in and out chaotically… :confounded:

I have attached a sketch to explain this better.

Have you already had this problem and can you help me? :slight_smile:


#2

Hey @Robi,

Ben from Axure Support here! I was able to take a crack at this and might have a solution that fits your needs.

If I’m understanding your setup correctly, the main issue is resetting the 3-second timer to hide the message, assuming it is currently shown.

To do this, I have set a timer that is constantly loading and counting down from 3 to 0 every second. When you press the button, it resets the text of this timer to 3.

I have included the project below:

3 second reset timer.rp (48.0 KB)


#3

Thank you really much! This helps me a lot! :slight_smile: