how to mute sounds ?

  • lazer
  • Novice
  • Novice
  • lazer
  • Posts: 16

Post 3+ Months Ago

hi all

i have Question :

i have attached so many sounds in my flash movie ok ..

i want to create 2 bottons 1- mute all the sounds (not to stop them) . 2- continue playing the sounds.

how can i do this please
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • yuriythebest
  • Banned
  • Banned
  • User avatar
  • Posts: 143
  • Loc: Ukraine

Post 3+ Months Ago

If you want to do that, you're going to have to play the sound using actionscript and not simply putting them in the property of a frame, first you must create a sound object lke so:

my_sound = new Sound();
my_sound.attachSound("idName");

(where idname is the id you MUSTTTTTTT give to the sound from the library window)

then in the needed time call it like so:

my_sound.start();

This code will edit the sound volume 0-100 (use it in your button)

my_sound.setVolume(volume)

I'm not going to explain how to use it in a button though, ask someone else.
:lol:
  • Natal
  • Beginner
  • Beginner
  • Natal
  • Posts: 49
  • Loc: Transylvania

Post 3+ Months Ago

Hi
to mute ALL the sounds use the following:

Code: [ Select ]
var global_sound = new Sound();
global_sound.setVolume (0);
  1. var global_sound = new Sound();
  2. global_sound.setVolume (0);


of course you can add this to the onRelease event of the button.
  • yuriythebest
  • Banned
  • Banned
  • User avatar
  • Posts: 143
  • Loc: Ukraine

Post 3+ Months Ago

or maybe even onPress :lol:
  • R.L.D.
  • Student
  • Student
  • User avatar
  • Posts: 83
  • Loc: Astoria,Queens

Post 3+ Months Ago

using:

sound = newSound()
sound = attachSound("url");
sound = start(0,1);
sound = setVolume(100);



Mute:

on(press){
sound = setVolume(0);
}

unMute:

on(press){
sound = setVolume(100);
}

that should mute the sound without stopping it.

Post Information

  • Total Posts in this topic: 5 posts
  • Users browsing this forum: No registered users and 17 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.