A Flash Developer Resource Site

Page 2 of 2 FirstFirst 12
Results 21 to 21 of 21

Thread: Help with audio (noob)

  1. #21
    Senior Member etuom's Avatar
    Join Date
    Sep 2006
    Location
    Minnesota
    Posts
    193
    I did an AS3 mute button and in light of your project I think you could do one that that addressed multiple sound objects with AND statements inside a button OnPress function using volume control.

    A true mute button is really a volume control toggle that allows the sounds to continue playing..

    AS1 would be different but the idea is the same: This is just pseudocode but for multiple sounds it might look something like:

    Actionscript Code:
    function onPress {
       if snd1.volume > 0 AND snd2.volume > 0 AND snd3.volume > 0 then
          snd1.volume = 0 AND snd2.volume = 0 AND snd3.volume = 0
       }else{
          snd1.volume = 1 AND snd2.volume = 1 AND snd3.volume = 1
       }

    someone good at AS1 would need to verify though. Maybe it needs to use getVolume() and setVolume()?
    Last edited by etuom; 07-24-2010 at 02:22 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center