View Single Post
  #2  
Old 06-08-2010, 12:28 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
Are you saying you want to use the <node3D>.playsound command but also manipulate the sound volume yourself? If so, look at the following:

Code:
import viz
viz.go()

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

slider = viz.addSlider()
slider.setPosition(0.5,0.2)
slider.set(1)

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

def changeVolume(value):
	sound.volume(value)
	
vizact.onslider(slider,changeVolume)
Reply With Quote