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

Get Adobe Flash player

 

       

 

Timer Challenge

 

Incrementing and Timing

Create a new app and save it as TimerPractice1.

Part 1. Click Counter. Write an app with a single button (download a large button image). The button should have text of 0 to start. Each time it is clicked, increment the button so that it displays the number of times it has been clicked. When the button gets to 15 have it say "Winner!" and then reset to 0.

Save your app and then save it as TimerPractice2.

Part 2.  Timer App. Create an app with a button that displays the number 10.

Code the app so that it counts down from 10 to 0, changing the number in the button every second, and speaking the number. When it hits 0, the counter should stop and the app speak out the words, “Finito!” The number on the button should be reset to 10.

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

Save your app and then save it as TimerPractice3.

Part 3. Modify the app so that it counts down from 30 to 0, but only speaks every five seconds (i.e., 30-25-20…). Hint: Modify the Clock.TimerInterval property and how much you decrement the value in the label each time Clock.Timer is triggered.

Save your app and then save it as TimerPractice4.

Part 4. Modify the app so that it repeats part 3 but when the timer gets to 10 it speaks every decrement till it finishes.

Save your app and then save it as TimerPractice5.

Part 5. Adding User Input. Turn the app into a timer so that it allows the user to enter the number they want the timer to start from. Add a slider bar which allows the user to change the speed of the timer with a max value of 1000 and a min value of 100. Add a Lap button that when the user presses the button the current timer count is displayed but the timer continues to run. Have a sound play once the timer ends.