I made 2 sounds: background and button sound.
This is the code:
_root.onLoad = function() {
backgroundSound = new Sound(this);
backgroundSound.attachSound(“sound_root”);
backgroundSound.start();
buttonSound = new Sound(button0);
buttonSound.attachSound(“sound_button”);
}
_root.onEnterFrame = function() {
backgroundSound.onSoundComplete(backgroundSound.start());
}
button0.onRelease = function() {
buttonSound.start();
}
The problem is the background sound plays but when I click on the button, the button sound doesn’t play.
Did I do something wrong?
Help, please. Thanks