# Help changing color for multiple objects

**URL:** <https://forum.kirupa.com/t/help-changing-color-for-multiple-objects/224523>\
**Category:** flash\
**Created:** [May 3, 2007, 1:02am UTC](https://forum.kirupa.com/t/help-changing-color-for-multiple-objects/224523 "2007-05-03T01:02:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Diddle](https://avatars.discourse-cdn.com/v4/letter/d/85f322/32.png) [@Diddle](https://forum.kirupa.com/u/Diddle)\
**Post date:** [May 3, 2007, 1:02am UTC](https://forum.kirupa.com/t/help-changing-color-for-multiple-objects/224523/1 "2007-05-03T01:02:33Z")

</div>

I’m coding up a website using Flash and I want to be able to change the site background as well as the button items color all at once via actionscript.

All the buttons are created with instances of the same base item (movie).

What’s the easiest way to have all of these items changed with a simple actionscript? I would prefer to avoid having one of these for each item:

```auto
var colorful = new Color("_root.MyItem");
    colorful.setRGB(0x336699);

```

I was thinking perhaps naming each item as a number and just making a loop… any better suggestions?

Thanks!
