Jump to content

Turning off sounds


kwdrysdale

Recommended Posts

I have tried searching this forum and google, but I can't seem to find anything that will teach me how to have an option to turn off the volume (by users option) of a flash file.  I've seen it on different sites, but can't figure out how to do it.  I have  a flash file with music in it, but want the viewers to be able to turn the music off if they want to.  Is there a way to do this?  If so, is there any place online that I can learn how to do it?  Thanks.

 

Kevin

Link to comment
https://forums.phpfreaks.com/topic/79196-turning-off-sounds/
Share on other sites

For that you need to add some actionscript on your flash file, if you have play and stop button keep this code in your buttons :: note here name of the movie clip instance for play and stop are stop_btn and play_btn and for name of the sound is my_sound

for stop button

stop_btn.onRelease = function() 
{
       my_sound.stop();
};

for play button

play_btn.onRelease = function() 
{
        my_sound.start();
};

 

Link to comment
https://forums.phpfreaks.com/topic/79196-turning-off-sounds/#findComment-400887
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.