# Button Colour Change

**URL:** https://forum.kirupa.com/t/button-colour-change/161701
**Category:** flash
**Created:** [September 6, 2005, 12:20pm UTC](https://forum.kirupa.com/t/button-colour-change/161701 "2005-09-06T12:20:39Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Tyg3r](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/tyg3r/32/1341_2.png) [@Tyg3r](https://forum.kirupa.com/u/Tyg3r)
#### Post date: [September 6, 2005, 12:20pm UTC](https://forum.kirupa.com/t/button-colour-change/161701/1 "2005-09-06T12:20:39Z")

</div>

Hi

Using the code below, I am able to change the colour of a movie clip simply by putting my mouse over a button and allowing the action script to do all the work.

```auto
 
btn.onRollover = function() {
my_color = new Color(colourbox);
my_color.setRGB(0x0033FF);
};
btn.onRollout = function() {
my_color = new Color(colourbox);
my_color.setRGB(0xDCAD4E);
};
 

```

Is it possible to make the colours blend into eachother, creating a smooth transtion purly using action script?

In the past i have seen people use the command “decay” to tell the movie to animate somthing. I think a similar approach is needed to make the colours blend using actionscript.

Its easy to animate this, but im hoping some coding can be of more assistance.

I have attatched a test file that I have been using. Feel free to download it.

Thanks in advance

Mark.N

* * *

[Lamborghini estoque](http://www.lamborghini-tech.com/wiki/Lamborghini_Estoque)
