Copy link to clipboard
Copied
This is my code where it can only stop. I want to make it play the song back can anyone help ?
silence.addEventListener(MouseEvent.CLICK,onStop);
function onStop(e:MouseEvent):void{
SoundMixer.stopAll();
silence.visible=false;
}
Copy link to clipboard
Copied
what's the code used to start the sound? or, if it's timeline sound, it needs to be in a movieclip (generally) with nothing else.
Copy link to clipboard
Copied
mpi.suara("bgm", "loop", 10);
mpi.aturSuara("onOff");
Copy link to clipboard
Copied
can you help me step by step since im using scene by scene not frame by frame ?
Copy link to clipboard
Copied
mpi.suara("bgm", "loop", 10);
Copy link to clipboard
Copied
what's mpi.suara()?
Copy link to clipboard
Copied
its a code i copy in the youtube tutorial, basically its like a database. I can just remove it and follow your guide.
Copy link to clipboard
Copied
I just want to mute and unmute the background song not the button sound
Copy link to clipboard
Copied
where's the background sound ? in your fl library or is it loaded from a file?
Copy link to clipboard
Copied
the background song in in the library with the linkage name bgm
Copy link to clipboard
Copied
create a new movieclip
place a stop() in frame 1
attach the sound to the 2nd frame
set its sync property to stream
extend the timeline to allow the sound to play completely.
put the sound on the same timeline as your play sound /stop sound button and assign it an instance name, eg sound_mc
if your button's instance name is sound_toggle, you can then use
var toggle:Boolean;
sound_toggle.addEventListener(MouseEvent.CLICK, sound_toggleF)
function sound_toggleF(e:MouseEvent):void{
if(!toggle){
sound_mc.play(); // continue sound
// sound_mc.gotoAndPlay(2); play sound from start
} else {
sound_mc.stop();
}
toggle=!toggle;
}
Copy link to clipboard
Copied
do I need to use button or can just use movie clip for the button ? there is an arrow saying SWF contains multiple copies of a sound item in which the song did not play
Copy link to clipboard
Copied
you can use a movieclip. i never use buttons.
movieclips can do everything buttons can do plus much more.
Copy link to clipboard
Copied
did as what you say, the output file said
SWF contains multiple copies of a sound item
Copy link to clipboard
Copied
the error panel is too small to show its contents.
and there's nothing i suggesed that would trigger what you report is in the output panel
Copy link to clipboard
Copied
the error panel is too small means ? what do I need to do ?
Copy link to clipboard
Copied
you should drag that so it's large enough to show if there's an error, but the output panel (which i didn't see) already indicates a problem.
Copy link to clipboard
Copied
this is the one ?
Copy link to clipboard
Copied
that's readable, and errors panel is there. click its tab to make sure nothing is there.
then click file>publish setting >tick permit debugging and retest to see if there's more info in your output panel.
let me know what's in the output and error panel after ticking that publish setting.
Copy link to clipboard
Copied
this ? how to solve this problem ? did I need to expand the timeline on the main menu for sound too?
Copy link to clipboard
Copied
btw can we zoom, teams or something to solve this problem? I need to do the testing in 2 hour if youre not busy
Copy link to clipboard
Copied
upload your fla somewhere and post a link here.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
hi did you can access it ?
Copy link to clipboard
Copied
what a mess. that makes it so difficult.
i cleaned up your library enough to see all the assets in the library panel. but part of you slopiness caused the problem: you have so much white space at your sounds start, you can't tell the sound is playing until 3+ seconds after it starts.
anyway, i did fix for it, but it would be better to open in audition and cut the white space.
and learn to append increasing version numbers on your fla names. here's your corrected fla: