Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Soundboard Help

New Here ,
Aug 29, 2014 Aug 29, 2014

Im Making a Soundboard and a feature I wanted to add was a stop all sounds button for ActionScript 3 and I'm having trouble getting the button to work properly. The button is simply stop a sound being played after sound was clicked on. Any help on the script to create this is greatly appreciated (Yep, I'm a noob to actionscripts)

TOPICS
ActionScript
167
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 31, 2014 Aug 31, 2014
LATEST

are you looking for code to 'prevent' future sounds from playing?

if so, you'll need to code that yourself.  a basic boolean would work:

var allowSounds:Boolean = true;

your_mute_toggle_btn.addEventListener(MouseEvent.CLICK,muteF);

function muteF(e:MouseEvent):void{

allowSounds=!allowSounds;

}

//then every place you have code to play a sound, eg

sc=whatever.play();

//use

if(allowSound){

sc=whatever.play();

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines