Thanks Janis...works great. Will take a closer look later. Kindly Joakim Carlgren
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Janis Radins Sent: den 10 mars 2006 15:17 To: Flashcoders mailing list Subject: Re: [Flashcoders] Get the average of 2 colors Get my ColorTween class at www.mediaverk.lv/asd/com/jR/Math/ColorTween.as Then do the simple thing: import com.jR.Math.ColorTween; var midColor:Number = new ColorTween([0xFF0000, 0x0000FF]).getPoint(255/2); trace("0x"+midColor.toString(16)) 2006/3/10, Joakim Carlgren <[EMAIL PROTECTED]>: > > Whats the easiest way to calculate the average of two colors? > > > > > > var color1:Number = 0xFF0000 > > var color2:Number = 0x0000FF > > > > var myColor:Color = new Color(my_mc) > > myColor.setRGB((color1 + color2) / 2) > > I know its not this simple and probably I need to play with bitwise > operators.. > > Any easy way to solve this? > > > > Joakim Carlgren > > > > > > _______________________________________________ > Flashcoders@chattyfig.figleaf.com > 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 > _______________________________________________ Flashcoders@chattyfig.figleaf.com 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 _______________________________________________ Flashcoders@chattyfig.figleaf.com 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