timer.resume doesn't work!

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!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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);

anyone? please....

oh c'mon...any Corona guru????

views:1407 update:2011/10/17 21:25:02
corona forums © 2003-2011