# All but this

**URL:** <https://forum.kirupa.com/t/all-but-this/218866>\
**Category:** Uncategorized\
**Created:** [March 12, 2007, 12:09am UTC](https://forum.kirupa.com/t/all-but-this/218866 "2007-03-12T00:09:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jamiller](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/jamiller/32/3433_2.png) [@jamiller](https://forum.kirupa.com/u/jamiller)\
**Post date:** [March 12, 2007, 12:09am UTC](https://forum.kirupa.com/t/all-but-this/218866/1 "2007-03-12T00:09:26Z")

</div>

So I basically have a bunch of buttons that when one is clicked I want the others to disappear via actionscript. I am using a for loop for all my btn code:

```auto
for(var i=0; i<=9; i++){
    var btn = this["btn"+i];
    btn.onRollOver = function() {
        var xbtn:Tween = new Tween(this, "_x", Strong.easeOut, this._x, this._x, .5, true);
        xbtn.continueTo(25, .3);
    }
    btn.onRollOut = function() {
        var xbtn:Tween = new Tween(this, "_x", Strong.easeOut, this._x, this._x, .5, true);
        xbtn.continueTo(16, .3);
    }
    btn.onRelease = function() {
        var abtn:Tween = new Tween("BUTTONS OTHER THAN ME!", "_alpha", Strong.easeOut, 100, 0, .5, true);
        var ybtn:Tween = new Tween(this, "_y", Strong.easeOut, this._y, 40, 1, true);
        this.onRollOver = this.onRollOut = function () {
            undefined;
        }
    }
}

```

In the onRelease code you’ll see where I need to make some kind of variable to define all buttons other than “this” and stick it right there…

any ideas?
