Hi,
I am new to Corona and have been experimenting with this for less than a few months.
I am attempting to find a solution to allow me to add a on/off sound option to a storyboard based app.
I found myself watching this video which I thought may help:
I’ve tried to follow his guidance but seem to get stuck with the following code (which is really basic):
local bgmusic = audio.loadStream(‘bgmusic.wav’)
local bgmusicplay = true
function playsound()
if bgmusicplay then
audio.play(bgmusic, { channel=1, loops=-1, fadein =500 })
end
end
I keep looking at this code but can’t seem to get my head around the problem. There are other parts of the code which involves adding buttons to play the sound or stop the sound but thats no necessary as yet.
I am using a public storyboard template to experiment with Corona SDK and programming itself and this code is placed as part of the start.lua.
If you need more information so as to provide me with guidance please ask.