FlxTween
can be used to change values over time following a number of available curve functions.
There are multiple motion tween functions available, but they all work roughly the same way.
Using color
allows you to change the x
and y
values of a FlxObject
over time.
// create a linear motion tween
FlxTween.linearMotion(myObject, fromX, fromY, toX, toY, duration, useDuration, {type: tweenType, easing: FlxEase: easeFunction});