Stop Watch

Hello,

I am am relatively new to coding so I am trying to do all the simple stuff first.

I want to make an app that involves a stopwatch, where if you touch a button it starts and touch it again it stops. I have been looking around and have been unable to find any tutorials.

Any help would be much appreciated.
Thankyou
Ollie

[import]uid: 67534 topic_id: 11033 reply_id: 311033[/import]

I’m not sure how to help you with your problem but I found a great resource for Corona tutorials. There might be one for you.

http://www.learningcorona.com/ [import]uid: 59140 topic_id: 11033 reply_id: 40150[/import]

Thankyou for your response, but I have looked everywhere and i still can not find anywhere.

function t:timer( event )
local count = event.count

print( “Table listener called " … count … " time(s)” )
self.text = count

if count >= 10 then
timer.cancel ( event.source )
end
end

timer.performWithDelay( 1000, t, -1 )

That is how i have set up my timer, does anyone know how i can make it to start when i press a button?

Thankyou
Ollie [import]uid: 67534 topic_id: 11033 reply_id: 40276[/import]

Give this a shot, It covers basic touch handling.

http://www.youtube.com/watch?v=8AqAUyHdhqI [import]uid: 59140 topic_id: 11033 reply_id: 40277[/import]