![]() |
|
#2
|
|||
|
|||
|
You could try this to keep only one timer active at a time.
Code:
import viz
viz.go()
def calculate():
print 'calculate'
def speed():
print 'speed'
timer1 = vizact.ontimer2(1,viz.FOREVER,calculate)
timer2 = vizact.ontimer2(1,viz.FOREVER,speed)
timer1.setEnabled(viz.OFF)
timer2.setEnabled(viz.OFF)
def funcA():
timer1.setEnabled(viz.ON)
timer2.setEnabled(viz.OFF)
vizact.onkeydown('a',funcA)
def funcB():
timer1.setEnabled(viz.OFF)
timer2.setEnabled(viz.ON)
vizact.onkeydown('b',funcB)
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| stopping a function | durf | Vizard | 1 | 03-31-2009 05:45 PM |
| stopping a goto() | vsully | Vizard | 1 | 01-24-2006 02:43 PM |
| partially stopping tracking | vsully | Vizard | 1 | 01-12-2005 10:02 AM |