Hi.
I have two buttons.
two objects.
everything works the way I want.
but when I use “Multitouch”
I have problems.
One button is like this
function object:touch( event ) if event.phase == "began" or event.phase == "moved" then if(event.target == object) then audio.play(nota1, {channel=1}) elseif(event.phase == "moved") then if(event.x \< object.contentBounds.xMin) or (event.x \> object.contentBounds.xMax) or (event.y \< object.contentBounds.yMin) or (event.y \> object.contentBounds.yMax) then audio.stop(1) end end elseif(event.phase == "ended") then audio.stop(1) end end object:addEventListener( "touch", object) Runtime:addEventListener("touch", object)
Runtime:addEventListener(“touch”, object)