# Multiple buttons: Fade out issue

**URL:** <https://forum.kirupa.com/t/multiple-buttons-fade-out-issue/213244>\
**Category:** flash\
**Created:** [January 18, 2007, 1:37am UTC](https://forum.kirupa.com/t/multiple-buttons-fade-out-issue/213244 "2007-01-18T01:37:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![friggingmick](https://avatars.discourse-cdn.com/v4/letter/f/58956e/32.png) [@friggingmick](https://forum.kirupa.com/u/friggingmick)\
**Post date:** [January 18, 2007, 1:37am UTC](https://forum.kirupa.com/t/multiple-buttons-fade-out-issue/213244/1 "2007-01-18T01:37:34Z")

</div>

The buttons share same tween class alpha function to fade out particular instance. The function only works when mouseover any first button and then can’t get the function to work again if mouseover another button afterward. Any suggestion?

```auto
import mx.transitions.Tween;
import mx.transitions.easing.*;

function box(easeType) {
        var begin = 100;
        var end = 0;
        var time = 0.2;
        var mc = _level10.box;
        boxTween = new mx.transitions.Tween(mc, "_alpha", easeType, begin, end, time, true);
}

button1.hit.onRollOver = function() {
		box(mx.transitions.easing.Strong.easeOut);
}

button1.hit.onRollOut = function() {
		_level10.box._alpha = 100;
	}
}

button2.hit.onRollOver = function() {
		box(mx.transitions.easing.Strong.easeOut);
}

button2.hit.onRollOut = function() {
		_level10.box._alpha = 100;
	}
}

```
