You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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?
The text was updated successfully, but these errors were encountered: