/ / Introduction
Timer events are triggered by the passing of time. To define a timer event, you drag a Clock component from the palette into your app in the Designer Window. Clock components have a TimerInterval property that is measured in milliseconds. The smaller your interval, the more often the TimerInterval will be called.
In the Blocks Editor, drag a Clock.Timer event out. Anything within this block will be called at every interval.
To move an object, you use the MoveTo method.
This moves the ball horizontally across the screen:

How fast an object moves depends on both the Clock Interval and the amount of pixels the object moves each time the interval is called. Smaller intervals provide smoother animations.
App Inventor includes blocks to deal with animation events like edge and collision detection.
EdgeReached is triggered whenever the animated sprite hits the edge of the canvas.
Edges follow the this numbering scheme:
1=north
2=northeast
3=east
4=southeast
-1=south
-2=southwest
-3=west
-4=northeast
CollidingWith and NoLongerCollidingWith are blocks to deal with collision detection.

NoLongerCollidingWith occurs when two objects collide and then separate.

Only perform this action if Ball1 hits ImageSprite1
When you need to compare components, you need to have a way to refer to a specific component. Inside the blocks drawers you will find blocks that refer to themselves.
The Clock block has a property TimerEnabled. If you set the value to false, the Timer Intervals will not be triggered:


The ClockTimer block allows you to change position, color and size over time. You could also change text or play sounds at certain times. The following changes the direction of the sprite based on the heading value when either edge is reached