Transitioning setfillcolor??

Would there be an easy way to transition to a new color using the setFillColor somehow in the parameters of a transition? Or would I have to manually keep track of some rgb values and then constantly update them as a transition happens?

Hope someone can point me in the right direction!!

Best,
Mario [import]uid: 11636 topic_id: 23267 reply_id: 323267[/import]

I don’t think this is possible in a normal Corona transition, so yes, you’ll need to do a Runtime listener or repeating timer to gradually shift the color.

You could slightly optimize the process by giving your actual object a red, green, and blue value (I.e. object.red = 50, object.green = 100). Then in the listener, you can use those “sub variables” to manage the object’s color, versus setting some master upvalue that the Runtime listener constantly needs to access.

A second option, if you’re applying a color shift to a static, non-moving image, like a background, is to make that object grayscale and put a red, green, and blue “overlay” on top, then adjust the alpha of those layers using standard transitions. A bit complicated yes, but it would spare the whole Runtime listener approach. :slight_smile:

Brent Sorrentino
Ignis Design

[import]uid: 9747 topic_id: 23267 reply_id: 93199[/import]