These notes introduce animation-- transforming objects over time. They are a good introduction prior
to the MoleMash tutorial.
review of apps and events explored so far
click events, touched, dragged (user-initiated), sms events (external)
teacher: draw diagram
Timer events: something occurs as time passes, i.e., on each time interval
A Clock component is used.
timerInterval -- default is 1000 (ms)
timerEnabled -- default is true, meaning Timer event will trigger every timerInterval
Any components can be transformed.
Within a canvas, you can put an ImageSprite or Ball. They only "live" within a Canvas.
they behave exactly the same. ImageSprite is different in that you can specify an image file for it.
demo: A sprite that moves back and forth across the screen
1. move sprite one second after a button is clicked
2. move sprite back and forth continuously after button is clicked (alternatively when app begins)