How to get this old script to work in AS2

how to get this old code to work in AS2


onClipEvent (load)
{
    buttC = new Color("_root.bg");
    baseColor = new Object();
    red = 255;
    green = 255;
    blue = 255;
    baseColor.ra = 0;
    baseColor.ga = 0;
    baseColor.ba = 0;
}
onClipEvent (enterFrame)
{
    redDiff = red - baseColor.rb;
    greenDiff = green - baseColor.gb;
    blueDiff = blue - baseColor.bb;
    baseColor.rb = baseColor.rb + redDiff / 4;
    baseColor.gb = baseColor.gb + greenDiff / 4;
    baseColor.bb = baseColor.bb + blueDiff / 4;
    buttC.setTransform(baseColor);
}

and my buttons would have this old code too:


on (rollOver) {
    action.red = 152;
    action.green = 152;
    action.blue = 104;
    action2.red = 255;
    action2.green = 255;
    action2.blue = 255;
    action3.red = 255;
    action3.green = 255;
    action3.blue = 255;
}