ok, well the reason "efficiency" is so important is because there are is alot of code weighing down what i want to be doing in the first place. so please...
hmm, the ra, rb, and rc variables are defined within the expression?
i thought i should mention, isnt it annoying that you cannot define variables in expressions in AS2.0 ? so annoying... but there is a way around this when using for loops...
the less the amount of defined variables, the higher the efficiency. furthermore the only reason variables should be used is if you will be working with what is going on in the variable, which in this case is irrelevant since this is an algorithm we're working with variables and functions should be kept at a minimal...
the reason im saying this is i felt you didnt see it necessary to bother with efficiency...
the more efficient my algorithms are, the more i can do with my code.
here it is refined:
for (var i=1, ra=0,rb=0,rc=0; i<=500; i++) {
attachMovie('colorme', 'colorme'+i, i, {_y:0, _x:i});
mcColor = new Color(this['colorme'+i]);
mcColor.setRGB((Math.sin(ra += .03)*127+128) << 16 | (Math.sin(rb += .02)*127+128) << 8 | (Math.sin(rc += .01)*127+128));
}
- for (var i=1, ra=0,rb=0,rc=0; i<=500; i++) {
- attachMovie('colorme', 'colorme'+i, i, {_y:0, _x:i});
- mcColor = new Color(this['colorme'+i]);
- mcColor.setRGB((Math.sin(ra += .03)*127+128) << 16 | (Math.sin(rb += .02)*127+128) << 8 | (Math.sin(rc += .01)*127+128));
- }
cool gradient... thanks man i will mess around with this =]
incase your interested in the things i wish to color->
http://huseyin.kicks-ass.net/htdocs/spacewarpdeus.html
there is an index of other stuff here ->
http://huseyin.kicks-ass.net/htdocs/