I couldn’t sleep last night so I thought I’d play with the new effects in Flex 4. With the ultimate intention of actually sleeping at some point I decided to try the AnimateColor effect first – my thinking was I could soothe myself to sleep with subtle colour changes over time.
I was surprised how quickly and easily I could achieve a colour changer and after playing with it for a while, it did indeed have the desired affect. So first thing this morning I thought I’d post up the tiny amount of code required to animate colors in Flex 4.
The animation has a duration of five seconds from the beginning of the transition to the end, and it will automatically set the rectangles colour based on the colour you pick from the “From Color” colour picker (As you can see when coding I fall in to the US spelling of colour – even on labels :p, but when blogging I revert back to my normal UK spelling)