thanks for advice, but i cant figure out how to make all that damn thing to work, thats my code now:
[lua]local prop = require(“property”)
local propertyBag = prop:init()
local ball = display.newCircle(0,0,15)
ball.x = display.contentWidth/2
ball.y = display.contentHeight/2
function moveball(event)
ball.x = event.x
ball.y = event.y
end
local function resumeStart()
– restore previous state
propertyBag:GetFromFile(“ballX”)
propertyBag:GetFromFile(“ballY”)
end
local function onSystemEvent( event )
if( event.type == “applicationExit” ) then
propertyBag:setProperty(“ballX”, ball.x)
propertyBag:setProperty(“ballY”, ball.y)
propertyBag:SaveToFile()
end
end
local function init()
– start and resume from previous state, if any
resumeStart()
ball:addEventListener(“touch”, moveball)
Runtime:addEventListener( “system”, onSystemEvent )
end
–start the program
init()[/lua]
and thats not working at all, i position ball on screen, then exit app on my android and then puff, everything like at first time, no changes in ball position(
i think i miss something crucial,but dont understand what( [import]uid: 16142 topic_id: 12111 reply_id: 44339[/import]