transition for rect from one color to another?

How do I transition my display.rect from one fill color to another?

Thanks
Alex
[import]uid: 3473 topic_id: 2274 reply_id: 302274[/import]

I put this really quick to get you started.

I didn’t test on Corona since I am emailing from my iPad

  
local red = 255;  
local blue = 255;  
local green = 255;  
  
local r = display.newRect(0,40,40,40);  
r:setFillColor(red,green,blue);  
local function runtime(event)  
  
 if green \> 0 then  
 green = green - 1;  
 blue = blue - 1;  
 r.x = r.x + 1;  
 r:setFillColor(red,green,blue);  
 else  
 Runtime:removeEventListener("enterFrame", runtime )  
 end  
end  
   
-- Add listener to begin animation  
Runtime:addEventListener( "enterFrame", runtime )  
  

Carlos [import]uid: 24 topic_id: 2274 reply_id: 6898[/import]