# 10Seconds Of Your Time

**URL:** <https://forum.kirupa.com/t/10seconds-of-your-time/181178>\
**Category:** flash\
**Created:** [March 7, 2006, 3:59am UTC](https://forum.kirupa.com/t/10seconds-of-your-time/181178 "2006-03-07T03:59:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mage](https://avatars.discourse-cdn.com/v4/letter/m/6f9a4e/32.png) [@Mage](https://forum.kirupa.com/u/Mage)\
**Post date:** [March 7, 2006, 3:59am UTC](https://forum.kirupa.com/t/10seconds-of-your-time/181178/1 "2006-03-07T03:59:19Z")

</div>

I’m noob to actionscript, need your help -

```auto

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:

```auto

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.
