This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2013-02-09 19:08:39

destructo-serpent
Scratcher
Registered: 2012-07-25
Posts: 1000+

mute

how do i add a mute button to my game? i've tried -


when gf clicked
forever
if <(music) = [yes]>
play sound [music v] until done
else
stop all sounds
and it just plays until the music is done, then stops. if i use
play sound [music v]
it just keeps repeating the first sound.
help?

Offline

 

#2 2013-02-09 19:31:01

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: mute

destructo-serpent wrote:

how do i add a mute button to my game? i've tried -


when gf clicked
forever
if <(music) = [yes]>
play sound [music v] until done
else
stop all sounds
and it just plays until the music is done, then stops. if i use
play sound [music v]
it just keeps repeating the first sound.
help?

Well, here's a variation that could work:

when gf clicked
forever
play sound [music v] until done
when gf clicked
forever
if <not <(music) = [yes]>>
stop all pinks//This should be [Stop all sounds].
end

I hope that this helps!

Last edited by ErnieParke (2013-02-09 19:31:43)


http://i46.tinypic.com/35ismmc.png

Offline

 

#3 2013-02-09 19:47:30

destructo-serpent
Scratcher
Registered: 2012-07-25
Posts: 1000+

Re: mute

it works, thanks.

Offline

 

#4 2013-02-09 19:48:35

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: mute

destructo-serpent wrote:

it works, thanks.

Your welcome!


http://i46.tinypic.com/35ismmc.png

Offline

 

Board footer