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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.