function preload() {
this.load.audio("mainTheme", "glitch.com asset")
}
function create() {
this.sound.play("mainTheme")
}
Idk why that don’t work
function preload() {
this.load.audio("mainTheme", "glitch.com asset")
}
function create() {
this.sound.play("mainTheme")
}
Idk why that don’t work
You need to load the audio, then add it to the scene, then play it. Check the demos out - they are great resources:
http://labs.phaser.io/edit.html?src=src\audio\Web%20Audio\play%20audio%20file.js