WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 03-07-2010, 10:13 PM
IGoudt IGoudt is offline
Member
 
Join Date: Sep 2009
Posts: 20
I would make use of a variable 'audioPlaying = True/False' that's being checked everytime a key-event occurs.

snippets: (I use self here since I think in classes/objects)

Code:
def playAudio(self, file):
self.audioPlaying = True
..code to start audio
Code:
def onkeydown(self, key):
if not self.audioPlaying:
 ... handle keys
else:
     print "audio playing, so keys are disabled"
in the place where you register onkeydown, register the following:
Code:
viz.callback(viz.MEDIA_END, self.audioEnded)

def audioEnded(self, e):
     self.audioPlaying = False
Reply With Quote
 


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
IVEx file extenstion unrecognised. sindi Vizard 2 12-10-2009 01:20 AM
Read file....many issues Uttama_vizard Vizard 9 07-08-2008 02:16 PM
File Management Uttama_vizard Vizard 2 07-01-2008 09:44 AM
How to make avatar's eyes to blink when speaking michelcm3 Vizard 12 01-15-2008 08:48 AM


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


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