# Tween Class issue with disabling buttons function

**URL:** <https://forum.kirupa.com/t/tween-class-issue-with-disabling-buttons-function/187748>\
**Category:** flash\
**Created:** [May 2, 2006, 1:51am UTC](https://forum.kirupa.com/t/tween-class-issue-with-disabling-buttons-function/187748 "2006-05-02T01:51:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![graylensman](https://avatars.discourse-cdn.com/v4/letter/g/5f9b8f/32.png) [@graylensman](https://forum.kirupa.com/u/graylensman)\
**Post date:** [May 2, 2006, 1:51am UTC](https://forum.kirupa.com/t/tween-class-issue-with-disabling-buttons-function/187748/1 "2006-05-02T01:51:33Z")

</div>

Here’s the situation. I’ve got AS calling on the Tween class for an expansion effect on rollover and rollout. When a user clicks on a button, it activates a number of functions, including one where all the buttons are deactivated (button.enabled =false). This includes the one you just clicked.

the problem is, when you click the button and all are deactivated, the button freezes in its rollover state. I want the button to return to its original size when you rollout.

I’ve tried else if statements, and that didn’t work. Here’s the AS:  
ActionScript Code:  
[FONT=Courier New][LEFT]btnTwo.[COLOR=#0000FF]onRollOver[/COLOR] = [COLOR=#000000] **function** [/COLOR]COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]  
[COLOR=#000000] **var** [/COLOR] widePop:Tween = [COLOR=#000000] **new** [/COLOR] Tween[COLOR=#000000]([/COLOR]btnTwo, [COLOR=#FF0000]"\_xscale"[/COLOR], mx.[COLOR=#000080]transitions[/COLOR].[COLOR=#000080]easing[/COLOR].[COLOR=#000080]Elastic[/COLOR].[COLOR=#000080]easeOut[/COLOR], [COLOR=#000080]100[/COLOR], [COLOR=#000080]125[/COLOR], btnThrob, [COLOR=#000000] **true** [/COLOR][COLOR=#000000])[/COLOR];  
[COLOR=#000000] **var** [/COLOR] highPop:Tween = [COLOR=#000000] **new** [/COLOR] Tween[COLOR=#000000]([/COLOR]btnTwo, [COLOR=#FF0000]"\_yscale"[/COLOR], mx.[COLOR=#000080]transitions[/COLOR].[COLOR=#000080]easing[/COLOR].[COLOR=#000080]Elastic[/COLOR].[COLOR=#000080]easeOut[/COLOR], [COLOR=#000080]100[/COLOR], [COLOR=#000080]125[/COLOR], btnThrob, [COLOR=#000000] **true** [/COLOR][COLOR=#000000])[/COLOR];  
highPop.[COLOR=#0000FF]start[/COLOR]COLOR=#000000[/COLOR];  
widePop.[COLOR=#0000FF]start[/COLOR]COLOR=#000000[/COLOR];  
[COLOR=#000000]}[/COLOR];  
btnTwo.[COLOR=#0000FF]onRollOut[/COLOR] = [COLOR=#000000] **function** [/COLOR]COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]  
[COLOR=#000000] **var** [/COLOR] wideDrop:Tween = [COLOR=#000000] **new** [/COLOR] Tween[COLOR=#000000]([/COLOR]btnTwo, [COLOR=#FF0000]"\_xscale"[/COLOR], mx.[COLOR=#000080]transitions[/COLOR].[COLOR=#000080]easing[/COLOR].[COLOR=#000080]Elastic[/COLOR].[COLOR=#000080]easeOut[/COLOR], [COLOR=#000080]125[/COLOR], [COLOR=#000080]100[/COLOR], btnThrob, [COLOR=#000000] **true** [/COLOR][COLOR=#000000])[/COLOR];  
[COLOR=#000000] **var** [/COLOR] highDrop:Tween = [COLOR=#000000] **new** [/COLOR] Tween[COLOR=#000000]([/COLOR]btnTwo, [COLOR=#FF0000]"\_yscale"[/COLOR], mx.[COLOR=#000080]transitions[/COLOR].[COLOR=#000080]easing[/COLOR].[COLOR=#000080]Elastic[/COLOR].[COLOR=#000080]easeOut[/COLOR], [COLOR=#000080]125[/COLOR], [COLOR=#000080]100[/COLOR], btnThrob, [COLOR=#000000] **true** [/COLOR][COLOR=#000000])[/COLOR];  
wideDrop.[COLOR=#0000FF]start[/COLOR]COLOR=#000000[/COLOR];  
highDrop.[COLOR=#0000FF]start[/COLOR]COLOR=#000000[/COLOR];  
[COLOR=#000000]}[/COLOR];  
btnTwo.[COLOR=#0000FF]onRelease[/COLOR] = [COLOR=#000000] **function** [/COLOR]COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]  
disableButtonsCOLOR=#000000[/COLOR];  
[COLOR=#000000]}[/COLOR]  
[/LEFT]  
[/FONT]
