I wonder that there are some ways to get the current position.
[lua]–a.lua
function new()
local a = display.newImage(“a.png”)
function touchHandle(e)
– print(e.phase)
if (e.phase == “began”) then
a.x = e.x;
a.y = e.y;
end
if (e.phase == “ended”) then
a.x = 10000;
a.y = 10000;
end
end
Runtime:addEventListener(“touch”, touchHandle);
return a;[/lua]
[lua]–main.lua
local camera = display.newGroup()
local a = require"a".new()
camera:insert(a);
–then follow with…cameraMoveHorizontal();[/lua]
Everytimes, I touched the screen, I found that the positions(x,y) of event did not much the current stage’s position. The value of event.x and event.y do not exceed screen’s size. While camera’s position is over screen’s size. I tried to find the references for solution but still get nothing.
Any help,thanks. [import]uid: 65906 topic_id: 15565 reply_id: 315565[/import]