Hi All,
I want change my object color in a timer
My code is below.
I hope my object color should change in a time but my object coming same red color.
What is my wrong?
[lua]obj = display.newRoundedRect( 100, 250, 60, 20, 4)
obj:setFillColor(0, 0, 0)
local function changeColor(i)
obj:setFillColor(i,0,0)
end
for a=1, 255 do
timer.performWithDelay (a*10,changeColor(a))
end
[/lua]