Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Sound Off Help

0 views
Skip to first unread message

gorco

unread,
May 15, 2006, 8:51:57 AM5/15/06
to
:o Hi,
I purchased a flash intro template and it did not include a Sound Off button.
Most of the programming consists of movies but there is a time line with sound.
Couldn't find the answer in my Flash MX book. Would I put the sound off action
script at the start of the layer with the sound? What if I then want to display
Sound ON, if the sound is turned off? Assistance is appreciated.
Gordco

Jim Esteban

unread,
May 15, 2006, 6:06:19 PM5/15/06
to
Not familiar with flash intro template but I'll take a stab at what I think
your trying to do. My guess is that you have two buttons one's instance is
called soundOff_btn and the others instance is name soundOn_btn. Then I'm
guessing you have a Off Sound in you library and an On Sound in your library.
I put all my scripts on the same layer ("actions"). So here's a program that
might work if I don't make any typing errors.
var mysound:Sound = new Sound();

soundOff_btn.onRelease=function()
{
mysound.attachsound("Off");
mysound.setVolume(50);
mysound.start();
}
soundOn_btn.onRelease=function()
{
mysound.attachsound("On");
mysound.setVolume(50);
mysound.start();
}

NSurveyor

unread,
May 15, 2006, 8:51:39 PM5/15/06
to
The easiest way is to use the Sound class with a sound object to control the
volume of the entire movie. Turning the volume to 100 turns all the sound on,
and likewise, 0 to turn all the sound off:

A little advertising for David Stiller's great blog.... ;)

<a target=_blank class=ftalternatingbarlinklarge
href="http://www.quip.net/blog/2006/flash/how-to-toggle-sound-globally">http://w
ww.quip.net/blog/2006/flash/how-to-toggle-sound-globally</a>

gorco

unread,
May 19, 2006, 9:01:21 AM5/19/06
to
Thx
0 new messages