# Buttons rollover effect

**URL:** <https://forum.kirupa.com/t/buttons-rollover-effect/182844>\
**Category:** flash\
**Created:** [March 21, 2006, 9:58pm UTC](https://forum.kirupa.com/t/buttons-rollover-effect/182844 "2006-03-21T21:58:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Page\_person](https://avatars.discourse-cdn.com/v4/letter/p/c4cdca/32.png) [@Page\_person](https://forum.kirupa.com/u/Page_person)\
**Post date:** [March 21, 2006, 9:58pm UTC](https://forum.kirupa.com/t/buttons-rollover-effect/182844/1 "2006-03-21T21:58:34Z")

</div>

I have a set of retectangular buttons that I’d like to swap colours depending on if you mouse over one of them.

Scenario:  
If you are on the “Links” page, the “LINKS” button is disabled and it is yellow. All the other buttons are blue and clickable.

What I want to do is change the colour of the “LINKS” button _if_ the user mouses over any of the other buttons.

So say they mouse over the “HOME” button. I want the “LINKS” button to change colour from yellow to blue while the “HOME” button changes from blue to yellow. But I want to make sure the “LINKS” button remains disabled and no changes occur to any of the other buttons.

I’ve seen this done with javascript as a swap image efect.

Is there a way to do this in FLASH MX 2004? A tutorial somewhere?

Thanks  
Page

---

<div class="post-metadata">

**Author:** ![kmria](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kmria/32/2248_2.png) [@kmria](https://forum.kirupa.com/u/kmria)\
**Post date:** [March 21, 2006, 11:56pm UTC](https://forum.kirupa.com/t/buttons-rollover-effect/182844/2 "2006-03-21T23:56:30Z")

</div>

This is one thing you can do.  
on my project I got all the buttons in movie instance and when you double clock on it, it looks like this.

![](http://www.c6h6.net/ss1.jpg)

All you do is write AS on HOME button that triggers on LINKS… for exmple,

```auto

HOME_mc.onRollOver = function() {
    LINKS_mc.gotoAndPlay("_over");    
}
HOME_mc.onRollOut = function() {
    LINKS_mc.gotoAndPlay("_out");    
}

```

what will happen is that when user moves mouse over home it will chance color (or any other animation you want) on to links button. Take a look at the FLA file I have attached. [Notice when you move mouse over Contact Us effect happens on “Notice Board” button]

---

<div class="post-metadata">

**Author:** ![Page\_person](https://avatars.discourse-cdn.com/v4/letter/p/c4cdca/32.png) [@Page\_person](https://forum.kirupa.com/u/Page_person)\
**Post date:** [March 22, 2006, 3:23pm UTC](https://forum.kirupa.com/t/buttons-rollover-effect/182844/3 "2006-03-22T15:23:42Z")

</div>

Hi,

Thanks!

This is pretty close to what I’m looking for.

Thanks again!

Page

> [@kmria](#):
>
> This is one thing you can do.  
> on my project I got all the buttons in movie instance and when you double clock on it, it looks like this.
> 
> All you do is write AS on HOME button that triggers on LINKS… for exmple,
> 
> ```auto
> 
> HOME_mc.onRollOver = function() {
> LINKS_mc.gotoAndPlay("_over");    
> }
> HOME_mc.onRollOut = function() {
> LINKS_mc.gotoAndPlay("_out");    
> }
> 
> ```
> 
> what will happen is that when user moves mouse over home it will chance color (or any other animation you want) on to links button. Take a look at the FLA file I have attached. [Notice when you move mouse over Contact Us effect happens on “Notice Board” button]
