Fixed Timer
March 2, 2009 12:00 AM
The way I would do it is to create the following: a text box called Display Timea variable called Countdown (initial value = 20)I would set an action On Timer: Every 1.0 seconds, Modify Variable, Target: Countdown, Subtract 1. Add a conditional that the action only fires if Countdown is greater than or equal to 0. I would set another action On Timer: Every 0.1 seconds, Change Contents, Target: Display Time, With: VAR(Countdown). I would add another conditional that this action only fires if Countdown is greater than or equal to 0. You may note that I chose different times to run the actions (1.0 vs 0.1 seconds). I did that to avoid any problems with misfiring. You don't want your timer to count down as 20, 19, 17, 16, ...I also put conditionals in there. You don't want to keep decrementing the variable when it's below 0. That's just wasted resources and could cause an error if the page is open too long (highly doubtful, considering the limits of variables). And if the content change should result in some blinking, you don't want it to keep blinking when 0 shows up. Just some thoughts on that.Kevin
Discussions have been disabled for this post