I am currently trying to write an RGB class, and I was wondering if actionscript supported assignment operators (and other operators i.e +,-,*,/);
If for example I have two colors:
var c1:RGB = new RGB(255,0,0);
&
var c2:RGB = new RGB(0,255,0);
I was wondering if it was possible to do something like
trace(c1+c2) // {R:255,G:255,B:0}
c1 += c2;
trace(c1) // {R:255,G:255,B:0}.
I have done this in C++ in the past using ::/=, or ::+= as an operator, and was just wondering if this was possible in flash using override operator or something?
Thanks in advance for any help!
Sam Halliday