summaryrefslogtreecommitdiff
path: root/objects.js
diff options
context:
space:
mode:
Diffstat (limited to 'objects.js')
-rw-r--r--objects.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/objects.js b/objects.js
index 323ccab..e4d0928 100644
--- a/objects.js
+++ b/objects.js
@@ -5518,9 +5518,16 @@ StageMorph.prototype.pauseAllActiveSounds = function () {
};
StageMorph.prototype.resumeAllActiveSounds = function () {
+ var newSounds = []; // remove Sounds that have been played so they do not resume
+
this.activeSounds.forEach(function (audio) {
- audio.play();
+ if (audio.ended === false) {
+ newSounds.push(audio);
+ audio.play();
+ }
});
+
+ this.activeSounds = newSounds;
};
StageMorph.prototype.muteAllSounds = function () {