Creating a bouncing button in flex
- by Yasmine
I am trying to make an effect on a button that when I mouse over it, it keeps jumping up and down smoothly and when mouse out it stops.
I tried this but the result was really bad:
<mx:Sequence id="bounceEffect" repeatCount="0">
<mx:Move duration="2000" yBy="10" easingFunction="{Bounce.easeOut}"/>
<mx:Move duration="2000" yBy="-10" easingFunction="{Bounce.easeOut}"/>
</mx:Sequence>
<mx:Button id="btn" label="Request Information" rollOver="bounceEffect.play([btn])"
rollOut="bounceEffect.end()" fillColors="[#ff0000, #ff0000, #ff0000, #ff0000]" color="#ffffff" textRollOverColor="#ffffff" />
Can someone help me on this?
There's something else I noticed when I mouse over the button and during the effect the text on the button becomes very hazy.
Thanks