Hey,
Is there a way I can transition an object’s fill color?
For example a rectangle that turns from green to red over a period of time.
Hey,
Is there a way I can transition an object’s fill color?
For example a rectangle that turns from green to red over a period of time.
Try this:
Download this file: https://github.com/roaminggamer/SSKCorona/blob/master/ssk/libs/extensions/transition_color.lua
Try this sample:
require “transition_color” local myCircle = display.newCircle( 100, 100, 25 ) transition.fromtocolor( myCircle, { 255, 255, 255 }, { 255, 0 , 0 }, 2000 )
Tip: This code is not future-proof. If transition adds fields with these names, it will break this code:
perfect, thank you
Try this:
Download this file: https://github.com/roaminggamer/SSKCorona/blob/master/ssk/libs/extensions/transition_color.lua
Try this sample:
require “transition_color” local myCircle = display.newCircle( 100, 100, 25 ) transition.fromtocolor( myCircle, { 255, 255, 255 }, { 255, 0 , 0 }, 2000 )
Tip: This code is not future-proof. If transition adds fields with these names, it will break this code:
perfect, thank you