I’m writing a childrens book and need to play a different sound clip for each page. The clip will play if I start it with a button but I want it to automatically start as soon as the page is changed. Here’s my code:
elseif (page == 5) then
media.playSound( "Sound-Forest.mp3" )
local stopAfter10Seconds = function()
media.stopSound()
end
timer.performWithDelay( 10000, stopAfter10Seconds )
Can a sound be started within an if statement or does it have to be tied to an event? I’ve spent hours looking over the forums, sample code and docs and haven’t found anything like this.
Thanks in advance. [import]uid: 6397 topic_id: 3641 reply_id: 303641[/import]