# Color with AS3

**URL:** <https://forum.kirupa.com/t/color-with-as3/242493>\
**Category:** Uncategorized\
**Created:** [October 26, 2007, 3:22pm UTC](https://forum.kirupa.com/t/color-with-as3/242493 "2007-10-26T15:22:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Macadia](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@Macadia](https://forum.kirupa.com/u/Macadia)\
**Post date:** [October 26, 2007, 3:22pm UTC](https://forum.kirupa.com/t/color-with-as3/242493/1 "2007-10-26T15:22:07Z")

</div>

i used to use setRGB in AS2 like this:

myColor.setRGB(myColors[randomColor]);

* * *

my goal is to have a movie clip’s color change randomly when i press a key.

does setRGB still work in AS3?

if so, how?

big thanks!
