FlxTween
can be used to change values over time following a number of available curve functions.
Using num
allows you to change a numerical value over time, and pass the value to a function to use however you want.
// create a numeric tween
FlxTween.num(fromValue, toValue, duration, {type: tweenType, easing: easeFunction}, updateFunction);
private function updateFunction(Value:Float):Void
{
// do something with the value
console.log(Value);
}