How to add a loop event?

ivan shared this question 5 years ago
Answered

For example:Countdown

Comments (1)

photo
1

may be related and hence sharing ...


Here's my loop scenario - screen has a set of circles that need to flash (like an alert). I tried the hide-pause-show-pause-reload trick but it seemed very bad. I also want to play an alarm beeping sound and dont want it to play over and over - so linking to same screen again wasn't a way for me.


Alright, I broke my head over this and solved it this way -


I added two input fields, made them completely transparent (no lines etc). Upon page load, I set focus on first text field. In the On-Focus-In event of textfield1, i hide the circles, pause and set focus on textfield2. In the On-Focus-In event of textfield2, I show the circles , pause and set focus on textfield1. And now I have a loop and my flashing circles forever without reloading the screen ! :)