event.xStart

Type Number
Event touch
Revision Current Public Release (2017.3068)
Keywords touch, xStart

Overview

The x position of the touch from the "began" phase of the touch sequence.

Example

local function drawLine( event )
    if ( event.phase == "ended" ) then
        local line = display.newLine( event.xStart, event.yStart, event.x, event.y )
        line.strokeWidth = 5
    end
end

Runtime:addEventListener( "touch", drawLine )