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?
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.