WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 03-31-2009, 10:18 AM
durf durf is offline
Member
 
Join Date: Feb 2009
Posts: 61
Ok thanks for that... If I wanted to do it via pressing keys and not a timer how would I do that. I got it to work but I have trouble after I go on to the next function... I can never go backwards.

IE

I press 'a' to initiate def func1():

I then press 's' to iniatiate def func2():

If I press 'a' again I get an error. I assume I need a ontimer or something but I have trouble trying to figure that out.

Any insight would be much appreciated
Reply With Quote
  #2  
Old 03-31-2009, 06:29 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
If you just want to call functions based on keypresses use something like

Code:
vizact.onkeydown('a', func1)
vizact.onkeydown('s', func2)
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
General question and question regarding arrays dan12345 Vizard 1 01-15-2008 11:15 AM
Timer cycling correctly? JMOwens Vizard 2 12-07-2007 10:57 AM
timer question again Elittdogg Vizard 3 10-18-2007 11:29 AM
timer question Elittdogg Vizard 5 10-10-2007 03:49 PM
Timer speed Jerry Vizard 1 12-08-2006 12:01 PM


All times are GMT -7. The time now is 10:24 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC