-
Notifications
You must be signed in to change notification settings - Fork 305
Open
Description
I'm currently loading background music into games using the following commands:
this.bgm = game.assets["mp3 file"];
this.bgm.play();
I've seen a few places online recommend the following as a workaround for enchant.js not having a built in looping function for sounds:
if (this.bgm.currentTime >= this.bgm.duration)
this.bgm.play();
This would be placed in the enterframe event of the scene where this.bgm was declared. However, once it calls, the entire game is reset along with the music. I've tried it on a few different programs & all desktop browsers as a test, although it could still be an error on my end. Is this something that's been reported before? Or am I just using a very out of date method?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels