Dear fellow app developers,
I put two audio files in one of my e-book pages. Could anyone tell me how to make “audio A” stop automatically without pressing “stop button” when I play “audio B”?
Thank you in advance.
Henry
local audioA = audio.loadStream(“12.mp3”)
function narratorA:touch(event)
audio.play(audioA)
end
function stop: touch(event)
audio.stop()
end
local audioB = audio.loadStream(“13.mp3”)
function narratorB:touch(event)
audio.play(audioB)
end
function stop: touch(event)
audio.stop()
end
narratorA:addEventListener (“touch”, narratorA)
narratorB:addEventListener (“touch”, narratorB)
stop: addEventListener (“touch”, stop)
backbutton:addEventListener (“touch”, stop)
[import]uid: 150748 topic_id: 28769 reply_id: 328769[/import]
