PDA

View Full Version : Global Mute?


eric_darling
11-27-2002, 03:18 AM
I'm working on a project on which I would like to include optional narration for various screens. I know I can provide a mute switch on a per-screen basis, but is there a way to provide a global sound toggle switch, so that a user would only need to switch it once? I'm willing to program some workarounds if anyone has a suggestion.

Worm
11-27-2002, 03:42 AM
Could you set a variable, or Registry value that would let you know if the MUTE is on/off? Then in the On Initialize check the value and set the mute accordingly.

eric_darling
11-27-2002, 04:01 AM
Worm, do you have any sample code that would illustrate your suggestion? I'm a bit meager on the registry/programming side of things. Sounds workable, though.

Worm
11-27-2002, 05:17 AM
I'm sure I could throw something together. What sound file are you using for the naration? WAV?

Corey
11-27-2002, 09:18 AM
I tried using a reg monitor to compare my registry before and after muting the volume but there was no change. So my sound card apparently doesn't store it's "global mute" setting value in the registry...

Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)

Worm
11-27-2002, 09:54 AM
Maybe I didn't understand exactly what you're wanting to do Eric, can you give me a better idea of what you're doing...

Sorry..

eric_darling
11-27-2002, 10:37 AM
OK... I've got screens with text windows on them. I'd like to be able to have voiceover narration reading the text (which, of course, differs from page to page). I can have them play when the page initializes, and I can have them mute when the user clicks a 'mute' button. But, when the page changes, how can I have AMS "remember" the mute setting so that the default play action does not occur?

Is there something we can do with On Initialize?

Basically, I'm looking for a way to have voiceover tracks be optional across an entire project.

Worm
11-27-2002, 10:55 AM
On the first page's On Initialize set a variable named
%Mute% = 0

When the user clicks the Mute object, set the variable:
%Mute% = 1

When you switch pages, where you start the next narration, do this:

If (%Mute%=0)
// Play your narration
End If

Corey
11-27-2002, 01:37 PM
Yes that's a very sound strategy.

Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)

eric_darling
11-27-2002, 02:32 PM
Thank you, Worm. (Always wanted to say that) /ubbthreads/images/icons/laugh.gif