WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 02-28-2009, 09:24 PM
djones1010 djones1010 is offline
Member
 
Join Date: Nov 2008
Posts: 15
Control volume with slider

I am currently working the Options page of my project.
I am having some trouble controlling the volume with a slider.
The desired result I want is to increase and decrease in volume and with each movement of the tick and have the sound play back with the change value for volume.

Could someone help me or give me a few hints?

Thanks
Reply With Quote
  #2  
Old 03-01-2009, 06:28 PM
DBurks2818 DBurks2818 is offline
Member
 
Join Date: Feb 2009
Posts: 8
Here's something my team made for our game:

Quote:
song = viz.add('[insert song].mp3')
song.play()
song.volume(1.0)

viz.clearcolor(0.5,0.5,1)

def myslider(obj, pos):
song.volume(0.8*pos)

viz.callback(viz.SLIDER_EVENT,myslider)
I couldn't quite get it at first either, but it turned out to be pretty simple.
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
Vizmenu slider bug? Gladsomebeast Vizard 2 10-22-2008 08:05 PM
Control of timers vizmaster Vizard 6 08-22-2008 09:36 AM
Blending/Fading 5 Textures with a Slider south_bank Vizard 2 05-15-2008 07:59 AM
intersense: Failed to set control word on \\.\COM1 OueOue Precision Position Tracker (PPT) 2 01-18-2007 12:51 PM
Overriding Mouse Control Vygreif Vizard 3 09-28-2005 08:51 PM


All times are GMT -7. The time now is 04:08 PM.


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