local loadBar = ccui.LoadingBar:create("LoadingBar.png", 1):pos(display.cx, display.cy) loadBar:addTo(self) loadBar:setPercent(1) local v = 0 self:schedule(function() print(v) v = v + 2 if v == 100 then v = 0 end loadBar:setPercent(v) end, 0.1)