# Help needed on changing color objects

**URL:** https://forum.kirupa.com/t/help-needed-on-changing-color-objects/118474
**Category:** Uncategorized
**Created:** [August 5, 2004, 7:46pm UTC](https://forum.kirupa.com/t/help-needed-on-changing-color-objects/118474 "2004-08-05T19:46:23Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![melissacheng82](https://avatars.discourse-cdn.com/v4/letter/m/7feea3/32.png) [@melissacheng82](https://forum.kirupa.com/u/melissacheng82)
#### Post date: [August 5, 2004, 7:46pm UTC](https://forum.kirupa.com/t/help-needed-on-changing-color-objects/118474/1 "2004-08-05T19:46:23Z")

</div>

hi, i’m doing a school project of mine and i am having trouble doing the changing color objects. here is an axample of the script that i;m using:

on (rollOver) {  
var colorful = new Color("\_root.shapes");  
colorful.setRGB(0x003366);  
}

For this script it does change color, but how do i make it to stay the same color that user selected after going to another scene?? Would really appreaciated your help. Thanks 🙂

---

<div class="post-metadata">

### Author: ![kapital](https://avatars.discourse-cdn.com/v4/letter/k/bc79bd/32.png) [@kapital](https://forum.kirupa.com/u/kapital)
#### Post date: [August 5, 2004, 7:57pm UTC](https://forum.kirupa.com/t/help-needed-on-changing-color-objects/118474/2 "2004-08-05T19:57:37Z")

</div>

add the actual colour changing code to the movie clip itself, ie.

onClipEvent(Load){  
var colorful = new Color(“this”);  
}

onClipEvent(enterFrame){  
colorful.setRGB( **variable whose value set by button** );  
}

---

<div class="post-metadata">

### Author: ![melissacheng82](https://avatars.discourse-cdn.com/v4/letter/m/7feea3/32.png) [@melissacheng82](https://forum.kirupa.com/u/melissacheng82)
#### Post date: [August 5, 2004, 8:08pm UTC](https://forum.kirupa.com/t/help-needed-on-changing-color-objects/118474/3 "2004-08-05T20:08:27Z")

</div>

hey, thanks for replying …but i’m a bit new to flash action script so i dont really get what you mean…add the script to which movieclip??the object??because currently i have the script in the button. :h:  
the attached file is an example of what i’m doing.
