Here are my codes,
before upgrading to V2013.2076, the time bar will disappear when the time count to 0
but after upgrading, it cannot do the same thing.
[lua]gameTimer = 15
local timers = {}
local function gameTimerUpdate ()
gameTimer = gameTimer - 1
if gameTimer >= 0 then
gameTimerText.text = gameTimer
end
end
gameTimerBar_bg = display.newRoundedRect( 160, 460, 280, 20, 4)
gameTimerBar_bg:setFillColor( 0, 0, 1 )
gameTimerBar_bg.anchorX=0.5
gameTimerBar_bg.anchorY=0.5
gameTimerBar = display.newRoundedRect( 160, 460, 280, 20, 4)
gameTimerBar:setFillColor( 0, 1, 0 )
gameTimerBar.anchorX=0.5
gameTimerBar.anchorY=0.5
gameTimerText = display.newText( gameTimer , 0, 0, “Helvetica”, 18 )
gameTimerText:setFillColor( 1, 0, 0 )
–gameTimerText:setReferencePoint(display.TopLeftReferencePoint)
gameTimerText.x = display.contentWidth * 0.5
gameTimerText.y = 456
transition.to( gameTimerBar, { time = gameTimer * 1000, width=0 } ) ---- time bar moving-----
timers.gameTimerUpdate = timer.performWithDelay(1000, gameTimerUpdate, 0) ---- time counting----[/lua]
you can download it and i test that it can run