there might be more clever ways...

var col = 0x0199FF;
var _r = (col>> 16);
var _g = (col>> 8 ^ _r << 8);
var _b = (col^ (_r << 16 | _g << 8));

trace("r="+_r);
trace("g="+_g);
trace("b="+_b);

var r = (_r.toString(16).length < 2) ? "0"+_r.toString(16) : _r.toString(16); var g = (_g.toString(16).length < 2) ? "0"+_g.toString(16) : _g.toString(16); var b = (_b.toString(16).length < 2) ? "0"+_b.toString(16) : _b.toString(16);
var hexa="0x"+r+g+b
trace("hexa="+hexa)




Anyone got any idea why this isn't working right? My blue values are
doing all sorts of wierd stuff - getting smaller, flipping out etc -
is it a modulo problem maybe? Should be simple but this always gets
me...

Any help much appreciated,
Alias
_______________________________________________
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

Reply via email to