# Change colour of movie

**URL:** https://forum.kirupa.com/t/change-colour-of-movie/184011
**Category:** Uncategorized
**Created:** [March 31, 2006, 10:13pm UTC](https://forum.kirupa.com/t/change-colour-of-movie/184011 "2006-03-31T22:13:30Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Icy\_Penguin](https://avatars.discourse-cdn.com/v4/letter/i/f6c823/32.png) [@Icy\_Penguin](https://forum.kirupa.com/u/Icy_Penguin)
#### Post date: [March 31, 2006, 10:13pm UTC](https://forum.kirupa.com/t/change-colour-of-movie/184011/1 "2006-03-31T22:13:30Z")

</div>

i need to change the colour of a graphic in a specific movie in a specific frame.

if i have a movie clip instance-named “sidetext” thats 15 frames long, and i want a graphic in the movie, called “letterp” to change to one of four colours that i want it to randomly at frame 10 and stay that colour uintil frame 15, how can i do this?

---

<div class="post-metadata">

### Author: ![rmo518](https://avatars.discourse-cdn.com/v4/letter/r/f19dbf/32.png) [@rmo518](https://forum.kirupa.com/u/rmo518)
#### Post date: [April 2, 2006, 4:12am UTC](https://forum.kirupa.com/t/change-colour-of-movie/184011/2 "2006-04-02T04:12:39Z")

</div>

Assuming that letterp is a movie clip with the instance name letterp - add the following code to frame 10 (where you put in the hexcodes for the four colors you want to use in place of 0xRRGGBB):  
[AS]colorArray = new Array(“0xRRGGBB”,“0xRRGGBB”,“0xRRGGBB”,“0xRRGGBB”);  
myColor = new Color(letterp);  
myColor.setRGB(colorArray[Math.floor(Math.random()\*colorArray.length)]);[/AS]  
Then on frame 15 to switch it back to its original color add this code (where you put in the hexcode for the original color):  
[AS]myColor.setRGB(0xRRGGBB);[/AS]  
Hope this helps.

---

<div class="post-metadata">

### Author: ![Icy\_Penguin](https://avatars.discourse-cdn.com/v4/letter/i/f6c823/32.png) [@Icy\_Penguin](https://forum.kirupa.com/u/Icy_Penguin)
#### Post date: [April 2, 2006, 5:04am UTC](https://forum.kirupa.com/t/change-colour-of-movie/184011/3 "2006-04-02T05:04:54Z")

</div>

yes it helps very much

thank you :?)
