Mute/Unmute

This forum is meant for posting anything related to Adventure Maker that doesn't fit in the other forums.Please post technical questions in the Technical Support Forum!

Moderators: time-killer-games, Vengeance66, Candle, reneuend, GM-Support

Mute/Unmute

Postby JasonMc » Fri Jul 09, 2010 11:52 pm

As you might know, I'm building a complex toolbar for my games, which will appear on most pages via Runtime Frames Merging.

I want to have a button that, when clicked, it mutes all the sound, and changes to a different image. Then, when it is clicked again, the sound comes back, and the original image comes back.

I have the two button images (a megaphone with audio lines, and one without), btw.
-Jason McDonald
Manager, Programmer
MousePaw Games

--
PocketWatch 1.0 Plugin now available in the Plugins Corner!
User avatar
JasonMc
Active Member
 
Posts: 99
Joined: Sun Jul 04, 2010 10:27 pm
Location: Pacific Northwest, USA

Postby jeeji1983 » Sat Jul 10, 2010 9:19 am

JasonMc,

It's very sample to do! First, create an Integer Variable, you can name it SoundControl, or any given name of your choice.

Second, Create an Hotspot using the image when the sound is ON. Go to Hotspot Properties, click on Action tab, then select STOP ALL SOUNDS. Go to Variables tab, then click the two checkbox. Select your SoundControl variable at MUST BE ENABLED ONLY IF and then add your variable to 0. At change the value of variable, add SoundControl to 1.

Create another Hotspot over this one. Click on the Audio tab, select all the music/sound you want to play when clicked, go to Variables tab, check the two checkbox, add SoundControl to 0 for the first checkbox, and to 1 for the second one.

You're done!

I hope this tutorial may help you.
Best Regards,
JeeJi1983 Interactive
User avatar
jeeji1983
Member
 
Posts: 54
Joined: Wed Dec 03, 2008 12:10 pm
Location: Canada

Postby JasonMc » Sun Jul 11, 2010 5:50 am

Thank you! That answers my question perfectly. :D

EDIT: I want to add that I found, to make things easier, instead of using the "stop all sounds" function and having to restart specific things (remember, this toolbar is going to be on Runtime Frames Merging...), you can do this:

Under Audio for the "turn sound off" button (hotspot properties), select "change volume" for the channels you want affected, and set the volume to "0". Then, for the "turn sound on" button (hotspot properties), select "change volume" for the channels you want affected, and set the volume to the original volume.

This way, background sounds and music will still continue playing (thus, no restart each time the button is clicked), yet you can't hear them unless you click the "turn sound on" button on again.

Thanks again for showing me where all that was, and for walking me through the variables, jeeji1983. I'm slowly catching on. :D
-Jason McDonald
Manager, Programmer
MousePaw Games

--
PocketWatch 1.0 Plugin now available in the Plugins Corner!
User avatar
JasonMc
Active Member
 
Posts: 99
Joined: Sun Jul 04, 2010 10:27 pm
Location: Pacific Northwest, USA

Postby juhuwoorps » Sun Jul 11, 2010 8:26 am

But change volume will not work under WIN7
juhuwoorps
Code Master
 
Posts: 622
Joined: Tue Jul 08, 2008 3:13 pm

Postby JasonMc » Sun Jul 11, 2010 10:18 pm

Well, I'm only planning on making this for XP and below, anyhow. 7 has compatibility issues with everything. :P
-Jason McDonald
Manager, Programmer
MousePaw Games

--
PocketWatch 1.0 Plugin now available in the Plugins Corner!
User avatar
JasonMc
Active Member
 
Posts: 99
Joined: Sun Jul 04, 2010 10:27 pm
Location: Pacific Northwest, USA


Return to Adventure Maker General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests