i'm trying to make a "sound" when i taps (began phase only) on the ball. it freezes corona simulator and crashes. here is my code:
function onTouch(event)
if event.phase == "began" then
local balltap = media.newEventSound( "balltap.wav" )
local playballtap = function()
media.playEventSound(balltap)
end
media.playEventSound( "balltap.wav", onComplete )
i'm trying to understand lua, its making sense (little) so far. i know i can learn it but baby steps right?
so is my code wrong? i've ben trying to play sound and failed at every attempted except this one. either way can someone point me in the right direction