Content on this page requires a newer version of Adobe Flash Player.

Get Adobe Flash player

 

       

 

Using the Timer for Animation

 

Using the Timer for Animation

Read and watch How do you animate sprite?

Create a new app and save it as AnimatedArrow1.

Part 1. AnimatedArrow1. Write an app with a canvas that has an arrow on it (download an arrow image). Add a Start button at the bottom of the screen that starts the arrow moving across the screen when it is pressed. The movement should be smooth and steady but not too fast.

Save your app and then save it as AnimatedArrowAndBalls.

Read and watch Animation and Animation Challenge

Part 2.  AnimatedArrowAndBalls.

Complete the Animation Challenge but save one as AnimationClock and the other as SpriteAnimation. When you are done both animations will be the same but one will use the clock timer and the other will use the sprite properties. Once you have finished all four show the final animation to your instructor for teacher check. You will also need to show the code for the other version of the animation but you will not need to demonstrate it.

Hint: Use a Clock component and its Clock.Timer event.

Save your app and then save it as ArrowButtonsAndBalls.

Part 3. Modify the app by adding Up, Down, Left and Right buttons to the bottom of the screen. Add code that allows the buttons to control the arrow, making it move up, down, left or right when the appropriate button is clicked.

Save your app and then save it as MyArrows.

Part 4. Have some fun and customize the app using what you now know.