Skip to main content
Known Participant
June 3, 2024
Question

SYNCRONIZED MUTE/UNMUTE SOUND BUTTON WHEN I CHANGE TO OTHER SCENE

  • June 3, 2024
  • 1 reply
  • 317 views

how can i set mute/unmute button synchronizedly when I want to changed to next scene. example I already play the sound at scene 1 but when I go to the scene 3, I was muted the button, and then when I go to scene 4, supposedly system will muted the sound because previous sceneI have muted the sound. But when I changed to scene 4 the sound play from the beginning of music. and this problems continuously to others frame also. 

 

I very need a help, thank you

 

 

    This topic has been closed for replies.

    1 reply

    kglad
    Community Expert
    Community Expert
    June 3, 2024

    you'll need to use code.

    Known Participant
    June 3, 2024

    i have used this code for sound to every scene

    stop();
    import flash.media.Sound;
    import flash.media.SoundChannel;
     
    SoundMixer.stopAll();
    btn_sound.addEventListener("click",function(){
    btn_sound.gotoAndPlay(2);
     
    });
    kglad
    Community Expert
    Community Expert
    June 3, 2024

    declare a boolean mute variable and use it to determine when to play clicks.