WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 05-28-2010, 09:44 AM
shahramy shahramy is offline
Member
 
Join Date: Dec 2009
Posts: 41
Unhappy 3D sound problem?

hi
I have used 3D sound attached in one of my node and I want play sound when I press specific key. it`s done but while i hold down the key. the sound does not play sequentially and it plays with a little interval and its not good for me.
has any body idea ?
Reply With Quote
  #2  
Old 05-28-2010, 10:51 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
So you want to play a looping sound when a key is pressed? If so, look at the following:
Code:
import viz
viz.go()

ball = viz.add('ball.wrl',pos = [0,2,8])

sound = ball.playsound('boing!.wav', viz.PAUSE)

#play and pause looping sound with keypresses
vizact.onkeydown('1',sound.play,viz.LOOP)
vizact.onkeydown('2',sound.pause)
Reply With Quote
Reply


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
Sound Looping Problem JMOwens Vizard 4 09-29-2010 10:42 PM
On click Sound Play Problems Robbos Vizard 1 02-28-2008 03:02 PM
sound problem shahargur Vizard 1 08-16-2007 03:04 PM
problem with female animations vmonkey Vizard 1 10-07-2005 11:36 AM
sound problem alaa Vizard 7 09-02-2005 02:13 PM


All times are GMT -7. The time now is 11:28 PM.


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