views:

35

answers:

1

I am using Greensock to tween and during a rollOver I need to disable some buttons. I am pretty sure the code is right but the buttons do NOT disable?

code:

import com.greensock.*;

btn_skins.addEventListener(MouseEvent.CLICK, function() { TweenLite.to(mtvOrange, .25, {y:0}); } ); btn_teenwolf.addEventListener(MouseEvent.CLICK, function() { TweenLite.to(mtvOrange, .25, {y:154.35}); } );

mtvOrange.addEventListener(MouseEvent.ROLL_OVER, function() { TweenLite.to(mtvRed, .25, {y:30}); btn_skins.mouseEnabled = false; btn_teenwolf.enabled = false; btn_skins.enabled = false; trace("hi there people"); } );

Any ideas?

+1  A: 

I did a test and setting the enabled property to false only prevents the button from going to its different states like Up, Over, and Down. Its event listeners will still work. If you want to actually disable a button you have to do remove its event listeners.

TreeTree