View Single Post
  #4  
Old 04-11-2009, 06:50 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
You could use viz.TOGGLE so that each time you press the key the timer will change states and your function will either start or stop being called

Code:
def funcA():
  timer1.setEnabled(viz.TOGGLE)

vizact.onkeydown('a',funcA)


def funcB():
  timer2.setEnabled(viz.TOGGLE)
  
vizact.onkeydown('b',funcB)
Reply With Quote