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

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

New Here ,
Jun 03, 2024 Jun 03, 2024

Copy link to clipboard

Copied

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

 

Nurul30711656tmef_0-1717444494233.pngNurul30711656tmef_1-1717444533763.pngNurul30711656tmef_2-1717444552509.png

 

Views

204

Translate

Translate

Report

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 ,
Jun 03, 2024 Jun 03, 2024

Copy link to clipboard

Copied

you'll need to use code.

Votes

Translate

Translate

Report

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
New Here ,
Jun 03, 2024 Jun 03, 2024

Copy link to clipboard

Copied

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);
 
});

Votes

Translate

Translate

Report

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 ,
Jun 03, 2024 Jun 03, 2024

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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
New Here ,
Jun 03, 2024 Jun 03, 2024

Copy link to clipboard

Copied

which part must i change/add to my code

Votes

Translate

Translate

Report

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 ,
Jun 03, 2024 Jun 03, 2024

Copy link to clipboard

Copied

LATEST

eg,

 

var mute:Boolean;

 

you probably havve a mute toggle in your app, where you would us

 

mute=!mute;

 

then wherever you have code (on the main timeline) to play a sound use

 

if(!mute){
// play your sound
}

 

Votes

Translate

Translate

Report

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