|
MotionGuides
Motion guided tweensTweensy has a package called guides which allow for defining a direction, orbit or bezier path to be used on a motion tween. Direction guided tweensA direction guide has a direction and a distance. Tweening the position on the Direction2D class defines where on the path the item is placed initially the path is at position 0 and ends at position 1. import com.flashdynamix.motion.; import com.flashdynamix.motion.guides.Direction2D; This will animate 'myInstance' a distance of 100 pixels at 45 degree from it's current position. Orbit guided tweensAn orbit guide has a radius x, radius y, center x and a center y. Tweening the angle in degrees on the Orbit2D class defines where on the path the item is placed initially the path is at the angle 0. import com.flashdynamix.motion.; import com.flashdynamix.motion.guides.Orbit2D; This will orbit 'myInstance' 360 degrees on a x/y radius of 100 from the x/y center point of 250. Bezier guided tweensA bezier guide has a collection of points defining a bezier path. Tweening the position on the Bezier2D class defines where on the path the item is placed initially the path is at position 0 and ends at position 1. import com.flashdynamix.motion.; import com.flashdynamix.motion.guides.Bezier2D; This will animate 'myInstance' along the bezier path defined from it's start position. |
Sign in to add a comment
Is there any tool or way to generate this control or through points that define the bezier curve?
Hey Turbohz, No there isn't yet but that's definitely a great idea. I have been working an AIR application which helps to experiment with Tweensy FX so this could probably include such functionality to simplify the generation of bezier paths.