I’ve been working with the following code, and if I call the timer.resume, it doesn’t execute. I used builds 626 and 619.
Please help!
[code]
local i = 0;
local t = display.newText("Count: "…i, 100, 100, “arial”, 30);
local function add()
i = i+1;
t.text = "Count: "…i;
end
timer1 = timer.performWithDelay(100, add, 0);
local function pause()
timer.pause(timer1);
end
local function play()
timer.resume(timer1);
end
local playBtn = display.newText(“PLAY”, 100, 200, “arial”, 40);
playBtn:addEventListener(“tap”, play);
local pauseBtn = display.newText(“PAUSE”, 100, 300, “arial”, 40);
pauseBtn:addEventListener(“tap”, pause);
[/code] [import]uid: 91271 topic_id: 15901 reply_id: 315901[/import]
[import]uid: 10478 topic_id: 15901 reply_id: 59086[/import]