Corona sdk 中是否有触摸和按住事件,如果没有那么该怎么做

is there a touch and hold event in Corona sdk, If not then how to do that

Corona sdk 中是否有触摸和按住事件,如果没有那么该怎么做。例如。我想在按住屏幕上的任意位置而不移动的同时增加圆的半径。怎么做。 '

谢谢

尝试(因为我知道你不能改变半径所以我使用 xScaleyScale 来增加圆)

local circle = display.newCircle(  display.contentCenterX, display.contentCenterY, 50 )
step = 0.02

local holding = false
local function enterFrameListener()
    if holding then
        -- Holding button
        circle.xScale = circle.xScale + step
        circle.yScale = circle.yScale + step
    else
        -- Not holding
        -- Code here
    end
end

local function touchHandler( event )
    if event.phase == "began" then
        Runtime:addEventListener( "enterFrame", enterFrameListener )
        holding = true  
    elseif event.phase == "ended" or event.phase == "moved" then
        holding = false
        Runtime:removeEventListener( "enterFrame", enterFrameListener )
    end
    return true
end

Runtime:addEventListener( "touch", touchHandler )

代码从post借用自whosebug.com。