I’m trying to set up my background music in my app but everything I’ve tried won’t work. I’ve googled a million different ways and youtubed a ton of videos. What am I missing? This is the last bit of code that i tried:
local audioisPlaying = true
local bgMusic = audio.loadstream ( “Assets/P_PURRPL.mp3” )
local function playsound()
if audioPlaying then
audio.play (bgMusic)
end
end
Runtime:addEventListener(“tap”, playSound)
and when i put it int he simulator it just says an error has occurred on lineXX near ‘,’
Is there somewhere specific that i am supposed to put this code for it to work?
This is my first app Ive done so I am very new to this.
Thanks!