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:
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?