Hey guys,
This is probably something simple but I'm scratching my head over easing with the Animate
class in Flex 4.
Basically I'm just trying to set easing via:
anim.easer = spark.effects.easing.EaseInOutBase(EasingFraction.IN_OUT);
however, it complains, saying
Type Coercion failed: cannot convert 0.5 to spark.effects.easing.EaseInOutBase.
Which would be fine, except... the constructor argument is a Number
, not an instance of EaseInOutBase
. Am I missing something? All of Google's results suggest that this should be defined via MXML, but I just feel... dirty doing it - rather, defining something that is purely programmatic with markup. I know that's half the nature of Flex, but still, I like to keep most of my logic/configuration in AS3.
If there's a better way to animate with easing than using Animate
with its easer
property (eg, if this isn't the right way), feel free to suggest an alternative - still a bit new to Flex.