Some Color Matrix Fun in Actionscript 3
I was reading Lee Brimelow’s BlogĀ ( http://gotoandlearn.com/play?id=63 ) and was having some fun playing with effects. While I was trying out a few different solutions to see what the effect would be. The problem was having to continuously recompile my flash movie to see the changed effect. A few numeric steppers later I was able to make a this little applications that spits out the colorMatrix Filter code.
Infinite Puddle:
Have fun and share your results!
But first: How Does the Color Matrix Filter work? The API Doc can be read here. But is creates a matrix that alters each pixel’s color channel.
Each channel is multiplied by the Red, Green, Blue, and Alpha channels and then offset by the last argument in each row.
Now the code I used was directly based off of Lee Brimelow’s code:
It only takes three variables to achieve this effect:
- A Sprite Holder of what to affect
- Blur Filter to create spill-off effect
- Color Matrix Filter to apply for Color
And then inside an Event.ENTER_FRAME you add this code:
and voila cool trails! Don’t believe me? Here are some examples I was playing around with:
Lava Lamp Looping Fluid effect :
Day Glow Trails
actionscript , AS3 , bitmap , blur , color , colorMatrix , cool , Design , development , draw , effects , Filter , Flash , matrix 







