10Seconds Of Your Time

I’m noob to actionscript, need your help -


stop();
this.onRelease = function() {
    if (_parent.currentselection != "realrecycling_instance") {
        gotoAndStop(2);
    }
    _parent[_parent.currentselection].gotoAndStop(1);
    _parent.currentselection = "realrecycling_instance";
};

Is inside a movieclip button with the instance name of realrecycling_instance.

This script is on several buttons so when I click each one Frame2 is displayed and the others revert to Frame1 etc.

How can I adapt this so it also includes:


this.onRollOver = function() {
    gotoAndStop(2);
};
this.onRollOut = function() {
    gotoAndStop(1);
};

But includes the onRelease function to keep Frame2 selected if it is clicked regardless of whether you RollOver/RollOut and change to Frame1 when a different link it clicked.