# onRollOver AS help

**URL:** <https://forum.kirupa.com/t/onrollover-as-help/228138>\
**Category:** flash\
**Created:** [June 5, 2007, 5:07pm UTC](https://forum.kirupa.com/t/onrollover-as-help/228138 "2007-06-05T17:07:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikedkap](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@mikedkap](https://forum.kirupa.com/u/mikedkap)\
**Post date:** [June 5, 2007, 5:07pm UTC](https://forum.kirupa.com/t/onrollover-as-help/228138/1 "2007-06-05T17:07:05Z")

</div>

Can anyone fix this for me - The movement is working perfectly, but the colorRollOver won’t work in conjunction with it. Thanks!

```auto

//Button Rollovers
function colorRoll(instance) {
    var colorPalette = new Color(instance);
    instance.onRollOver = function() {
        colorPalette.setRGB(0x133A5A);
    };
    instance.onRollOut = function() {
        colorPalette.setRGB(0x333333);
    };
}
colorRoll(nav.what_but);
colorRoll(nav.how_but);

//
//WHAT BUT
nav.what_but.onPress = function() {
    nav.sub_nav._visible = true;
};
//
nav.what_but.onRollOver = function() {
    _root.motion1 = -392.9;
    _root.motion11 = -360.4;
};
//
nav.what_but.onRollOut = function() {
    _root.motion1 = -394.9;
    _root.motion11 = -358.4;
};
//

```
