Animated countdown

Hello! I am trying to build an animation so that when a page loads I show a number counting down from say 50 to 5. Ease in and out would be nice to have. I can do it with 45 dynamic panels but it feels a bit clumsy if I want to change the start and end number. This is for a game to show a users final score.

You could definitely do that by setting up a global variable “Counter” (and set its default value, to for example “50”) and then set the text (in your text box) to print that variable value.

Then you say OnPageLoad -> Wait (to get a nice delay before counter starts) -> Set Variable Value
set value to be the variable minus 1. (click the “fx” icon and “Insert Variable or Function” Use your “Counter” variable and take minus 1. ([[Counter-1]])

If you want to be fancy with the animations you can do that by using the “on show” event on the text box. (just make sure you start it off hidden, and hide it again after every variable change, ir the show event won’t fire)

Hope that helps!