Timed Activity: How do you repeat an action, pausing between each iteration?

How do you program time? How do you program animation? With many programming languages, concepts like animation are pushed back in the curriculum-- you might not get there until a year or two of coursework. With App Inventor’s event-based approach, you can explore timed activity and animation as a beginner. The high-level Clock component serves as an alarm clock, and you use its Timer event to trigger timed activity. Check out the following examples:

Example 2. How do you play a sound every 5 seconds?

example 3

The Clock.TimerInterval property determines how often the Clock.Timer event triggers. By default, the timer interval is set to 1000 ms, or 1 second. If you set it to 5000, the Clock.Timer event will trigger every 5 seconds. It is a bit confusing and indirect, because you typically set the TimerInterval in the Designer, and the when Clock.Timer event is in the blocks editor. But just realize that the timer will be triggered every “TimerInterval” milliseconds.