Alice Community  

Go Back   Alice Community > Alice 2 > Share Objects

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Countdown timer object
Status: Offline
Posts: 38
Join Date: Nov 2011
Default Countdown timer object - 11-28-2011, 08:10 PM

Apologies if similar objects have been posted before, but here's my version of a countdown timer object.

The main methods are
- displayTime, refreshes the time
- updateTime, occurs approximately every second
- resetTime, resets the time to the default starting time
- setTime, sets the default starting time. Also sets the current time to the default
- stopTimer, stops the timer
- startTimer, starts the timer

I used the "when ... true" event to run updateTime continually when the timer is not stopped.

I used "when key pressed" events to call stopTimer, startTimer and resetTimer.

I called setTime in an initialisation method inside a "when world starts" event.
Attached Files
File Type: a2c Timer.a2c (41.8 KB, 103 views)

For video tutorials on programming in Alice 2.2 check out my YouTube channel

Also check out my Programming in Alice blog at
Reply With Quote

countdown timer, object

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Copyright ©2023, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.