Color Object

can anyone tell me why this isnt working?
[AS]
colors = new Color(line0);
colors.setRGB(0xFF0000);
for (k=1; k<=9; k++) {
“colors”+k = new Color(line+k);
this[colors+k].setRGB(0xFFFFFF);
mc = line0.duplicateMovieClip(“line”+k, k);
mc._rotation = this[“line”+(k-1)]._rotation+10;
mc._x = this[“line”+(k-1)]._x+15;
}
[/AS]

It is supposed to set all the duplicated movie clips to the color FFFFFF. And no I can’t do it later because eventually I want each one to be a progressive shade lighter of the same color. For example, line1 is FFFFFF, line 2 is EEEEEE etc so I cant set them all to once color object.

[AS]colors = new Color(line0);
colors.setRGB(0xFF0000);
for (k=1; k<=9; k++) {
mc = line0.duplicateMovieClip(“line”+k, k);
mc._rotation = this[“line”+(k-1)]._rotation+10;
mc._x = this[“line”+(k-1)]._x+15;
this[“colors”+k] = new Color(mc);
this[“colors”+k].setRGB(0xFFFFFF);
}[/AS]
??

-smacks head- duh that was an obvious mistake. sadly it still doesnt work. Im pretty sure something is wrong with the color lines in the for loop, either syntax or data type wise.

OK… the code works. What do you want to do exactly? :-\

i got it :). It was supposed to generate not random colors but progressive colors. Here is the code I ended up using:
[AS]
for (k=1; k<=40; k++) {
mc = line0.duplicateMovieClip(“line”+k, k);
myColor = Math.round( hex*0xFFFFFF );
pink = new Color(“line”+k);
pink.setRGB(myColor);
mc._rotation = this[“line”+(k-1)]._rotation+10;
mc._x = this[“line”+(k-1)]._x+spacing;
hex += .0001
}
[/AS]

Oh!! I didn’t read that in your first reply. :stuck_out_tongue:

Oh and here is the fla in case you were wondering what the heck I was doing. (I was wasting time at work). missed a bit huh :slight_smile: oops.

Hey kax, you are 366 days older than me. March 6 is my bday