multitouch dont work. How to enable multitouch?
local rect = display.newRect(100,100,15,15) rect.id = "rect" rect:setFillColor(1,0,1); local rect2 = display.newRect(200,200,15,15) rect2.id = "rect2" rect2:setFillColor(0,1,1); local rect3 = display.newRect(150,150,15,15) rect3.id = "rect3" local rect4 = display.newRect(40,40,15,15) rect4.id = "rect4" local function Touch (event) if event.phase == "began" or event.phase == "moved" then if event.target.id == "rect" then rect3.x = rect3.x -1; elseif event.target.id == "rect2" then rect4.x = rect4.x +1; end end end rect:addEventListener("touch",Touch) rect2:addEventListener("touch",Touch)