PDA

View Full Version : Need help with a counter



DericLanza
07-03-2008, 07:04 PM
I have a reading test, I need to timer out (3 minutes) the reader.

How can I set a variable to count in minutes? :rolleyes

RizlaUK
07-03-2008, 07:46 PM
in your projects page on show event start a timer for every 1 second


Page.StartTimer(1000);
Counter=0

in your projects page on timer event put this


if Counter == 180 then
-- counter limit reached
Page.StopTimer()
Counter=0
-- your code here


else
Conter=Counter+1
end


you can then use "Page.StartTimer(1000)" in a button or page load or wherever to start the 3 min timer, it will stop automaticly when the limit is reached, remember to reset the "Counter = 0" if the user dose not time out

hope that helps