# The random color tutorial, a question

**URL:** <https://forum.kirupa.com/t/the-random-color-tutorial-a-question/276372>\
**Category:** Uncategorized\
**Created:** [November 26, 2008, 9:41am UTC](https://forum.kirupa.com/t/the-random-color-tutorial-a-question/276372 "2008-11-26T09:41:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jiruharudo](https://avatars.discourse-cdn.com/v4/letter/j/97f17d/32.png) [@Jiruharudo](https://forum.kirupa.com/u/Jiruharudo)\
**Post date:** [November 26, 2008, 9:41am UTC](https://forum.kirupa.com/t/the-random-color-tutorial-a-question/276372/1 "2008-11-26T09:41:42Z")

</div>

Hey guys,

I’ve tried the awesome tutorial at;

\*[http://www.kirupa.com/developer/actionscript/tricks/randomcolor.htm](http://www.kirupa.com/developer/actionscript/tricks/randomcolor.htm)

[http://www.kirupa.com/developer/flash5/randomcolor.htm\*](http://www.kirupa.com/developer/flash5/randomcolor.htm*)

(Again, awesome tutorials, my thanks!)

However, I’m trying to build that in AS2. -and to be honnest, I didn’t have much luck.

Did anyone try and update the tutorial to AS2 in Flash 9?

I’ve searched the forums for the question, but I’m afraid nothing could really assist me…

I did however found this script by lostinbeta and shuga;

```auto
onClipEvent (enterFrame) {
	red = Math.sin(ra += .02)*127+128;
	green = Math.sin(rb += .05)*127+128;
	blue = Math.sin(rc += .09)*127+128;
	myCol = red << 16 | green << 8 | blue;
	myColored = new Color(this);
	myColored.setRGB(myCol);
}

```

_(Great & Easy script guys!)_

But I need the color on the multible MC’s to differ from one and other…

Would anyone be as kind to help me out and maybe even …explain it to me?
