# Drawing lines with different color

**URL:** <https://forum.kirupa.com/t/drawing-lines-with-different-color/168894>\
**Category:** flash\
**Created:** [November 11, 2005, 12:12am UTC](https://forum.kirupa.com/t/drawing-lines-with-different-color/168894 "2005-11-11T00:12:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![superprg](https://avatars.discourse-cdn.com/v4/letter/s/858c86/32.png) [@superprg](https://forum.kirupa.com/u/superprg)\
**Post date:** [November 11, 2005, 12:12am UTC](https://forum.kirupa.com/t/drawing-lines-with-different-color/168894/1 "2005-11-11T00:12:55Z")

</div>

for(i=0;i\<20;i++)  
{  
with (\_root.lines) {  
// \_root.lines.lineStyle(constlinethickness, “0x”+\_root.datacolor[curr],100);  
//\_root.lines.lineStyle(3, “0x000000”,100);  
\_root.lines.lineStyle(3, “0x000000”,100);  
moveTo(55.5+40\*i, 275);  
\_root.lines.lineTo(55.5, 5);

}How can I modify the above loop so that each line is of different color  
I want to change the variable “0x000000” with i
