Flex Mouse Events, Effects and functions
While adding some effects to a flex application, I noticed some strange behaviour. All of a sudden I noticed a function I had set to fire on the click event of a button was no longer firing.
I originally thought the effect intercepted the call in some way, but it turns out I had the effect set to fire on the mouseDownEffect. Changing the effect to fire on the mouseUpEffect brought the function back in to play.
A mouseDownEffect apparently changes the button before the click event fires. Hope this helps someone.
This is bad
2<mx:Button label="Change More Text" click="changeText();" mouseDownEffect="aWipeEffect" />
This is good
2<mx:Button label="Change More Text" click="changeText();" mouseUpEffect="aWipeEffect" />