Randy,
You can use ColorTransform to invert colors:
// code
stop();
import flash.geom.ColorTransform;
import flash.geom.Transform;
toggleClr_btn.label.text = "Invert";
toggleClr_btn.onRelease = toggleClr;
var imgClr:Transform = new Transform(image_mc);
var toggleFlag:Boolean = false;
function toggleClr():Void{
toggleFlag = !toggleFlag;
if(toggleFlag){
// invert
var clrTrans:ColorTransform = new ColorTransform(-1, -1, -1,
1, 255, 255, 255, 0);
imgClr.colorTransform = clrTrans;
}else{
// restore
var clrTrans:ColorTransform = new ColorTransform(1, 1, 1, 1,
0, 0, 0, 0);
imgClr.colorTransform = clrTrans;
}
}
HTH
-Keith
http://home.mn.rr.com/keithreinfeld
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Randy Tinfow
Sent: Wednesday, October 18, 2006 12:07 PM
To: [email protected]
Subject: [Flashcoders] Bitmap filters
Having a hard time understanding the new bitmap filters, specifically
the color matrix filter. We want to programmatically invert an image's
colors. Is there any documentation that explains the color matrix
properties succintctly? Or provides step-by-step instructions on it's
application?
Thanks,
Randy Tinfow
IMAGE PLANT
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com