Why is it that when you click on an object in the scroll, only the 'began' phase is called

function(event)

    local phase = event.phase

    local object = event.target

    if phase == "began" then

        audio.play(clickSound)

        object.alpha = object.alpha0

        blockGroup.x = blockGroup.x0 + params.offsetX

    elseif phase == "moved" then

        object.alpha = object.alpha0

        if (paramsBlock["scroll"]) then

            paramsBlock["scroll"]:takeFocus(event)

        end

        blockGroup.x = blockGroup.x0

    elseif phase == "ended" or phase == "cancelled" then

        object.alpha = object.alpha0

        blockGroup.x = blockGroup.x0

    end

    return true

end

Because you’re taking the focus away from the object and therefore its touch listener.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.