I've been playing with LiveCode for a week or two now, done the tutorials on the LiveCode website (culminating with the 3-5-7 game) and have since tried my hand at realizing a project that I've wanted to create for myself: A countdown timer, specifically to use at the gym. My end goal is to implement the following functions:
- User can set any time desired (in seconds, I'm not really worried about minutes/hours)
Can stop/start the timer at will (basic stopwatch functionality)
Can be set to repeat the set time automatically (i.e. a round timer)
Can set two (or more) intervals, e.g. 60 second interval followed by 20 second interval, and repeat. (Like 60 seconds of work, 20 seconds rest)
Play a tone when an interval is completed
And... Run on Android. Some day
Code: Select all
global timeLeft, interval
on mouseUp
put field "timer" into interval
put field "timer" into timeLeft
startTimer
end mouseUp
command startTimer
repeat for interval times
wait 1 second
get timeLeft - 1
put it into timeLeft
put timeLeft into field "timer"
end repeat
end startTimer
Please keep the explanations kindergarten-level; I'm a total newb to LiveCode and don't have any previous coding experience. This is my first non-tutorial attempt at creating an app
