View Single Post
  #1  
Old 04-08-2009, 12:14 PM
durf durf is offline
Member
 
Join Date: Feb 2009
Posts: 61
stopping ontimer

My program runs on onkeydown() that are assigned to different def func:. When i switch from func A to func B. A is still running. The reason is I think is becuase of the ontimers that I have associated with it. So is there anyway to stop and ontimer? Any other suggestions to handle this problem?
Code:
 
def funcA():

  def calculate():
  #CODE  

  vizact.ontimer2(0,viz.FOREVER,calculate)
vizact.onkeydown('a',funcA)

def funcB():

  def speed():
  #CODE

  vizact.ontimer2(0,viz.FOREVER,speed)
vizact.onkeydown('b',funcB)
Reply With Quote