Flash ActionScript Desaturate Image

Posted by Vineela | Uncategorized | Monday 10 August 2009 6:53 am

Import an image into the flash
convert to movieclip
give identifier as sample

and here is the code


var img:sample = new sample();
addChild(img);

img.x = stage.stageWidth/2;
img.y = stage.stageHeight/2;

img.filters = [new ColorMatrixFilter([0.3086, 0.6094, 0.0820, 0, 0, 0.3086, 0.6094, 0.0820, 0, 0, 0.3086, 0.6094, 0.0820, 0, 0, 0, 0, 0, 1, 0])];

This movie requires Flash Player 9

 

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

You must be logged in to post a comment.