justinmind-logo
 
Upvote 3

How to add a loop event?

Answered Victor Conesa 9 years ago

For example:Countdown

Replies (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 ! :)

Leave a Comment
 
Attach a file