Creating a bouncing button in flex
Posted
by Yasmine
on Stack Overflow
See other posts from Stack Overflow
or by Yasmine
Published on 2010-03-23T10:08:34Z
Indexed on
2010/03/23
10:13 UTC
Read the original article
Hit count: 221
flex
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
© Stack Overflow or respective owner