
Original Photo with natural colors.
|
||||||
|
||||||
Click by Click: Color Matrix Filter with ActionScript
Full Version: This is a shortened click by click version of a: Full Length Tutorial

Free
Flash Tutorial
![]()
The Color Matrix Filter lets you add color filters to Movie Clips, Buttons, Text and Bitmap Images. A Color Matrix Filter shifts the color in a particular direction. It allows changes to the images color saturation, hue, luminance brightness and other color shift effects.
Example: Download the Flash file Draw 218a
![]() Original Photo with natural colors. |
The red & blue colors have been increased. |
In this tutorial you will learn the ActionScript needed to apply the Color Matrix Filter to a Movie Clips with a Jpeg image placed inside the Movie Clip.
In this tutorials you will create the following Color Matrix Effect:
Example: Download the Flash file Draw 218a
Flash Movie created with a Color Matrix Filter.
Step One: Setting up the Document
Step Two: The ActionScript
// Makes the filter available to use in the Movie.
import flash.filters.ColorMatrixFilter;// Defines which colors to change.
var myMatrix:Array = [2,0,0,0,0, /* Red */
0,1,0,0,0, /* Green */
0,0,2,0,0, /* Blue */
0,0,0,1,0 ]; /* Alpha Transparency */// Creates a variable with info about the Filter settings.
var colorMatrix = new ColorMatrixFilter(myMatrix);// Applies the filter to the object named myObject.
myObject.filters = [colorMatrix];
Important Note: There is considerably more information in the full version of this tutorial especially as to how to set the Matrix to achieve particular color effects. Full Version of this: Tutorial
I hope you have found this useful. If so perhaps you could recommend this site to others and link to webwasp!
Full Version of this: Tutorial
Why not try out webwasp's new community. Meet new people, find friends in your area: Webwasp Mates & Dates
•
2025 visitors to this page since
2 April 07 •
|
|
|
All material on this site is protected under international copyright © law. DO NOT reproduce any material from this site without written permission. Please ask as permission is often granted.
|