I am trying the most basic of text code and cannot get it to work. I read several other posts and something is still not working. I know the function is firing, but the screen shows “10” and the displaytxt is not updating when the screen is tapped. Any help on this is appreciated!
[code]
_W = display.contentWidth
_H = display.contentHeight
time_remain = 10;
local displaytxt = display.newText(time_remain, 0, 0, native.systemFont,32*2);
displaytxt.xScale = .5; displaytxt.yScale = .5;
displaytxt:setReferencePoint(display.BottomRightReferencePoint);
displaytxt.x =_W-20; displaytxt.y=_H-20
local addscore = function(e)
time_remain = time_remain + 10;
displaytxt.txt = time_remain;
end
Runtime:addEventListener(“tap”,addscore)
[/code] [import]uid: 67366 topic_id: 11015 reply_id: 311015[/import]