Is there anyway we can replicate Photoshop's adjustment layer in Flash?
I see that we can replicate开发者_StackOverflow社区 blend like overlay. But didn't see a way to replicate Hue/Saturation adjustment layer for example.Thanks,
TeeYou can use the ColorMatrixFilter
- not sure if it will render exactly the same, but here a sample you can try:
var colorFilter:AdjustColor = new AdjustColor();
var mColorMatrix:ColorMatrixFilter;
var mMatrix:Array = [];
var MC:MovieClip = new MovieClip();
function adjustColors():void
{
//all 4 must contain a value of an integer, if one is not set, it will not work
colorFilter.hue = 50;
colorFilter.saturation = 50;
colorFilter.brightness = 50;
colorFilter.contrast = 0;
mMatrix = colorFilter.CalculateFinalFlatArray();
mColorMatrix = new ColorMatrixFilter(mMatrix);
MC.filters = [mColorMatrix];
}
True North Creative's answer will work if you take the AS3 route, but you would probably have more control and efficiency if you create/use Pixel Bender filters instead.
more here: http://www.adobe.com/devnet/pixelbender.html
精彩评论