Game Development Community

Adjusting Volume for guiBitmapButton

by Stanley D Chatman · in Torque Game Builder · 09/21/2007 (6:47 pm) · 0 replies

You can set the audio the plays mouseOver and mouseDown for a guiBitmapButton by setting it in the profile as follows:

if(!isObject(myCustomProfile))  new GuiControlProfile (myCustomProfile){
  
      soundButtonDown = "buttondownAudio";
      soundButtonOver = "rolloverAudio";
      border = false;
   };

if(!isObject(mainmenuclickProfile))  new GuiControlProfile (mainmenuclickProfile){
  
      soundButtonDown = "buttondownAudio";
      soundButtonOver = "mainmenuclickAudio";
      border = false;
   };

My question is once this has been set is there anyway to adjust the volume for these sounds. I know how to set via
alxSetChannelVolume( menuloadingAudio, %this.value );
but in this case no explicit call to alxplay is ever made.

I have tried the following but is does not work.

buttondownAudio.volume = 0;
      rolloverAudio.volume = 0;
      mainmenuclickAudio.volume = 0;
      
      
      mainmenuclickProfile.soundButtonDown.volume = 0;
      mainmenuclickProfile.soundButtonOver.volume = 0;
      myCustomProfile.soundButtonDown.volume = 0;
      myCustomProfile.soundButtonOver.volume = 0;