How can I use the "return" in a Timer. - New Question

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
L.Coder
Posts: 15
Joined: Mon May 04, 2015 12:34 am

How can I use the "return" in a Timer. - New Question

Post by L.Coder » Sun May 17, 2015 9:15 pm

Hello, I´m working on two timers.

the first timer count down 30 seconds and the other count down 20 seconds. First starts the timer 1, when it finish starts the other.
I want to make a button where you can select the number of times that you want to the timers repeat that process.

How can i do that?

I did this but is not working, the timer does not count:

Code: Select all

 
on mouse up 

put 4 into RepeatT

end mouse up

Code: Select all


on mouseUp
   
  repeat RepeatT times
   put 20 into CountTimer
   put 10 into CountRest
   put CountTimer into fld "tCount1"
   put CountRest into fld "tCount2"
   
   send "UpdateTimer" to me in 1 second
end repeat

end mouse up

Pistris
Posts: 148
Joined: Mon Jul 20, 2015 2:40 am

Re: How can I use the "return" in a Timer. - New Question

Post by Pistris » Thu Aug 20, 2015 8:42 pm

where you able to resolve this?

is the RepeatT variable global?
if not, you the variable has empty value everytime mouseup handler is called

plus the handler is called mouseup not mouse up

edd.

Post Reply